[solved] cache with url variables
I am doing some test with the cache functionality using a proxy context (call /api/) to a tomcat application.
it seem like as long as I don't send any URL variables to the origin server the cache works perfect and expires as it should, but when I give the application any variable such as:
it wont cache and will request new information all the time. I am just calling the variables via GET not POST. Is there a way to cache matching the url regardless the variables?
it should work as you expect. may relate to the cache policy you set.
what's your cache policy ?
the cache policy is at the context level. I am setting
enable cache = yes
cache expire time = 30 seconds
cache stale age = 5 seconds
virtual host and server are not set to anything.. only cache path is set to a directory. not sure if I am missing something..
context level setting is ok, it'll override server/vhost level setting.
cache policy refer following settings:
Cache Request with Cookie
Cache Response with Cookie
Ignore Request Cache-Control
Ignore Response Cache-Control
Enable Private Cache
hmm... it looks like missing one setting:
Cache Request with Query String
will report to development.
as a workaround, please set vhost level
Cache Request with Query String:Yes
see if works.
excellent, that was the setting I was looking for. as you mention is not present at context level, but it is at vh. Its working now as expected
|All times are GMT -7. The time now is 10:18 PM.|