[solved] cache with url variables

gdewey

Well-Known Member
#1
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:

http://192.168.120.48/api/api.cfm?name=Dewey

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?

tks
 
Last edited by a moderator:

gdewey

Well-Known Member
#3
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..
 

NiteWave

Administrator
#4
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.
 

gdewey

Well-Known Member
#5
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

tks
 
Top