]> git.ipfire.org Git - thirdparty/squid.git/commit - src/urn.cc
Removed StoreClient::created() and improved PURGE code quality (#734)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Mon, 26 Oct 2020 16:21:34 +0000 (16:21 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 26 Oct 2020 23:54:00 +0000 (23:54 +0000)
commit7976fed3725088add7a2776633efdcf4eaa20077
tree8c38f6ca38aa5c4b765a27d683679ba22f108bde
parent762ed79ac1bc01d9da1b2dc0491229e85bac44e4
Removed StoreClient::created() and improved PURGE code quality (#734)

The StoreClient::created() callback method was probably added in hope to
make Store lookups asynchronous, but that functionality has not been
implemented, leaving convoluted and dangerous synchronous created() call
chains behind. Moreover, properly supporting asynchronous Store lookups
in modern code is likely to require a very different API.

Removal of created() allowed to greatly simplify PURGE processing,
eliminating some tricky state, such as `purging` and `lookingforstore`.

Also removed all Store::getPublic*() methods as no longer used.
21 files changed:
src/ICP.h
src/Store.h
src/StoreClient.h
src/client_side.cc
src/client_side_reply.cc
src/client_side_reply.h
src/client_side_request.cc
src/client_side_request.h
src/esi/Esi.cc
src/htcp.cc
src/icp_v2.cc
src/icp_v3.cc
src/ip/Address.h
src/mime.cc
src/redirect.cc
src/servers/Http1Server.cc
src/store.cc
src/store_client.cc
src/tests/stub_icp.cc
src/tests/stub_store.cc
src/urn.cc