John G. Moylan wrote:
Hi,
I have an app which sends PURGE's to squid caches on demand or on
document changes. It testing this works fine and I am making PURGE
requests on document changes as part of a publish event. 200 or 404
responses are almost instantaneous as all of the servers are on the same
network.
Hoe does squid execute the PURGE internally? Does it mark the object in
the cache to be PURGE'd the next time the object is requested or does it
remove as soon the item when the PURGE request is made? Will there be
situations when a PURGE requests might time out on a busy Squid? It is
advisable to have my publisher Queue up PURGE requests in a separate
thread or process?
Lot of questions ;).
Squid needs to scan the object cache to find the matching URL then
update any of several indexes of information for erasure.
Squid treats PURGE like any other request and does not reply until its
finished. As such it _may_ timeout before being run. The problem though
is that on a busy cache the PURGE request is likely to be the most
resource hungry operation going and block other requests being accepted.
Yes it's advisable to spread them out rather than bunch them up. For the
reason above.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
Current Beta Squid 3.1.0.14