08 февраля 2012, 13:37 от Quintin P. : > Thanks would be difficult
because my intention is to maintain per page > cache. So we are talking
about 1000+ pages and more being created > dynamically. > > -Quintin > >
2012/2/8 Валентин Бартенев > > > On Wednesday 08 February 2012 11:44:04
Quintin P. wrote: > > > Hi all, > > > > > > A section of my virtual(say
/industry) is cached with > > > > > > proxy_cache_key
$scheme$host$request_uri; > > > > > > key. This will cache all pages
under this virtual. I do cache > > invalidation > > > by firing a
request with > > > > > > proxy_cache_bypass > > > > > > Now if I need to
invalidate cache for a page under this virtual, how > > should > > > I
go about doing it? > > > > > > Say /industry is the location directive >
I need to invalidate just > > > > > > /industry/category/cars
How do I do this? Do you want to do per-request cache
invalidation based on client information (header values, cookies,
originating IP etc.), so the cache is bypassed whenever a client sends a
request that matches your cache invalidation criteria, or do you want to
be able to invalidate a certain URI for all future clients and requests
by sending some kind of “switch caching off for this URI” request? Max
Can someone help? My small site on a tiny VM is being bombarded and the
cache invalidation is clearing up everything. Which means warming up the
caching takes a lot of expensive queries.
Can someone help? My small site on a tiny VM is being bombarded and
the cache invalidation is clearing up everything. Which means
warming up the caching takes a lot of expensive queries.
What cache invalidation? What caching strategy are you using?
Are working with a content based expiration logic or from a
microcaching perspective?
You can inspect the cache using a small shell script:
I should be able to invalidate just “cars” because my page for cars have
changed but not others. Say a person added a comment in the cars page.
Another analogy is to invalidate cache for a single blog post when all
the
blog posts have been cached under a single location directive.
-Quintin
Cache-Control containing “no-cache”, “no-store”, “private”, or a
“max-age”
with a non-numeric or 0 value
Expires with a time in the past
X-Accel-Expires: 0“
This also means that if I send a curl call from my backend with a
Cache-Control : max-age=1, then the corresponding request/page in cache
will get invalidated the next second.
X-Accel-Expires also does the same thing I suppose. That solves my
dilemma.
I should be able to invalidate just “cars” because my page for cars
have changed but not others. Say a person added a comment in the
cars page. Another analogy is to invalidate cache for a single blog
post when all the blog posts have been cached under a single
location directive. -Quintin
Send a ‘X-Accel-Expires: 0’ header from the application at: