rewrite before caching?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a uri with cachebusting in it that looks like this:
/path?killCache=x&parameter1=y%parameter2=z
where x is a unix timestamp used to make sure the url isn't cached by
the browser.

Now though I want to use apache disk caching on this url. Obviously with
the killCache parameters always changing though, this is futile. And I
can't ignore the query string because parameter1 and parameter2 are
important to the output to the end-user, so the cache would be
inconsistent if I had caching ignore the query string.

So I decided to rewrite the url to remove the killCache parameter, and
while this rule itself works fine (I'm rewriting to a path not a full
url), it seems the cache check is done before the rewrite, as in the log
I see:

 [Wed Mar 18 12:02:47 2009] [debug] mod_cache.c(131): Adding CACHE_SAVE
filter for /path
[Wed Mar 18 12:02:47 2009] [debug] mod_cache.c(138): Adding
CACHE_REMOVE_URL filter for /path
[Wed Mar 18 12:02:47 2009] [debug] mod_headers.c(740): headers:
ap_headers_output_filter()
mod_cache.c(639): cache: Caching url:
/path?killCache=x&parameter1=y%parameter2=z 
[Wed Mar 18 12:02:47 2009] [debug] mod_cache.c(645): cache: Removing
CACHE_REMOVE_URL filter. 
[Wed Mar 18 12:02:47 2009] [debug] mod_disk_cache.c(962): disk_cache:
Stored headers for URL
http://myhost/path?killCache=x&parameter1=y%parameter2=z
[Wed Mar 18 12:02:47 2009] [debug] mod_disk_cache.c(1051): disk_cache:
Body for URL http://myhost/path?killCache=x&parameter1=y%parameter2=z
cached.

And I get a different cache file stored for every value of the parameter
killCache.

Anybody know a way to get the rewriterule processed before the cache
mechanism? I can rewrite to a full url and the new request will then
pull from cache, but that induces an extra request and an extra log
entry, which I'd like to avoid if at all possible.

Thanx,

-Tony
---------------------------
Manager, IT Operations
Format Dynamics, Inc.
303-573-1800x27
abiacco@xxxxxxxxxxxxxxxxxx
http://www.formatdynamics.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux