Discussion:
Query strings are can't stored in Cache storage ?
Vasanth Mathivanan
2018-10-11 12:56:28 UTC
Permalink
Hi,

We have php based applications to used for front end and back end MySQL .We have edge server to point the application server ,but it didn’t store cache that all requests are comes “TCP MISS” in log file . Then tried to enabled the plugin of cache Manipulation key (cache_key.so @@param=--include-params=true) in remap rule . It works fine but only stored “css and js ”files only .However static php file (vodservice.php) or query based file (online.php?cust_id=1637&submenu_id=120) did not stored in cache . I not sure this is correct or not ,So how to stored the php content with and without query in cache storage?

__Vasanth



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
Fieck, Brennan
2018-10-11 13:57:51 UTC
Permalink
Sounds like you might also have to set it to store dynamic-looking content. I can't remember if that's the default or not...

________________________________
From: Vasanth Mathivanan <***@evolutiondigital.com>
Sent: Thursday, October 11, 2018 6:56 AM
To: ***@trafficserver.apache.org
Subject: [EXTERNAL] Query strings are can't stored in Cache storage ?


Hi,

We have php based applications to used for front end and back end MySQL .We have edge server to point the application server ,but it didn't store cache that all requests are comes "TCP MISS" in log file . Then tried to enabled the plugin of cache Manipulation key (cache_key.so @@param=--include-params=true) in remap rule . It works fine but only stored "css and js "files only .However static php file (vodservice.php) or query based file (online.php?cust_id=1637&submenu_id=120) did not stored in cache . I not sure this is correct or not ,So how to stored the php content with and without query in cache storage?

__Vasanth



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
Zelkowitz, Evan
2018-10-11 15:06:49 UTC
Permalink
@plugin=cachekey.so @pparam=--separator= @pparam=--static-prefix=http://replacement-fqdn.com
Is similar to what we use for a lot of our remaps and Im pretty sure that will keep the query strings, if you want them dropped you can add @pparam=--remove-all-params=true, then it will replace the fqdn with the one from the static prefix

The default is to keep all query params as long as you aren’t specifying any of the query param cachekey options

One thing to note is that separator option, which is just a blank space, without that I believe you end up with cachekeys which have elements separated by ‘/’ instead, which is fine if that’s fine with what you’re wanting

From: "Fieck, Brennan" <***@comcast.com>
Reply-To: "***@trafficserver.apache.org" <***@trafficserver.apache.org>
Date: Thursday, October 11, 2018 at 7:58 AM
To: "***@trafficserver.apache.org" <***@trafficserver.apache.org>
Subject: [EXTERNAL] Re: Query strings are can't stored in Cache storage ?


Sounds like you might also have to set it to store dynamic-looking content. I can't remember if that's the default or not...

________________________________
From: Vasanth Mathivanan <***@evolutiondigital.com>
Sent: Thursday, October 11, 2018 6:56 AM
To: ***@trafficserver.apache.org
Subject: [EXTERNAL] Query strings are can't stored in Cache storage ?


Hi,

We have php based applications to used for front end and back end MySQL .We have edge server to point the application server ,but it didn’t store cache that all requests are comes “TCP MISS” in log file . Then tried to enabled the plugin of cache Manipulation key (cache_key.so @@param=--include-params=true) in remap rule . It works fine but only stored “css and js ”files only .However static php file (vodservice.php) or query based file (online.php?cust_id=1637&submenu_id=120) did not stored in cache . I not sure this is correct or not ,So how to stored the php content with and without query in cache storage?

__Vasanth



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
Vasanth Mathivanan
2018-10-12 05:42:25 UTC
Permalink
Yes , its default parameter to enabled in “proxy.config.http.cache.cache_urls_that_look_dynamic INT 1” on records.config .But its didn’t work.

I tried below given configuration using separator ,prefix etc . it seems to be problem still alive every hit goes to “MISS”

__Vasanth

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Fieck, Brennan<mailto:***@comcast.com>
Sent: Thursday, October 11, 2018 7:28 PM
To: ***@trafficserver.apache.org<mailto:***@trafficserver.apache.org>
Subject: Re: Query strings are can't stored in Cache storage ?


Sounds like you might also have to set it to store dynamic-looking content. I can't remember if that's the default or not...

________________________________
From: Vasanth Mathivanan <***@evolutiondigital.com>
Sent: Thursday, October 11, 2018 6:56 AM
To: ***@trafficserver.apache.org
Subject: [EXTERNAL] Query strings are can't stored in Cache storage ?


Hi,

We have php based applications to used for front end and back end MySQL .We have edge server to point the application server ,but it didn’t store cache that all requests are comes “TCP MISS” in log file . Then tried to enabled the plugin of cache Manipulation key (cache_key.so @@param=--include-params=true) in remap rule . It works fine but only stored “css and js ”files only .However static php file (vodservice.php) or query based file (online.php?cust_id=1637&submenu_id=120) did not stored in cache . I not sure this is correct or not ,So how to stored the php content with and without query in cache storage?

__Vasanth



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
Miles Libbey
2018-10-11 16:16:08 UTC
Permalink
Can you send the list the header output of the various curls? eg

curl -IXGET "http://example.com/phpthatisntcaching.php"
and
curl -IXGET "http://example.com/cssthatiscaching.css"

in particular, the Cache-Control headers.
On Thu, Oct 11, 2018 at 5:56 AM Vasanth Mathivanan
Post by Vasanth Mathivanan
Hi,
__Vasanth
Sent from Mail for Windows 10
Vasanth Mathivanan
2018-10-12 07:30:03 UTC
Permalink
Difference of php and css file various header output of curl responses:



[***@wow-den-stremer174 trafficserver]# curl -IXGET "http:// trafficserverurl:8089/idemand4u_buckeye/tivo_dev_failover/init.php"

HTTP/1.1 200 OK

Date: Fri, 12 Oct 2018 07:22:45 GMT

Server: ATS/6.2.3

X-Powered-By: PHP/5.3.3

Set-Cookie: PHPSESSID=sgauuca5u1osm6nroeqgodlp52; path=/

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

Content-Length: 2776

Content-Type: text/html; charset=UTF-8

Age: 0

Connection: keep-alive

Via: http/1.1 trafficserverurl.com (ApacheTrafficServer/6.2.3 [uScMsSf pSeN:t cCMi p sS])



[***@wow-den-stremer174 trafficserver]# curl -IXGET "http://trafficserverurl.com:8089/idemand4u_buckeye/tivo_dev_failover/css/style_blue_darkrednm.css?v=1539328852"

HTTP/1.1 200 OK

Date: Fri, 12 Oct 2018 07:02:30 GMT

Server: ATS/6.2.3

Last-Modified: Mon, 08 Oct 2018 09:45:03 GMT

ETag: "2b137d-bdf7-577b479bf01bc"

Accept-Ranges: bytes

Content-Length: 48631

Content-Type: text/css

Age: 1250

Connection: keep-alive

Via: http/1.1 trafficserverurl.com (ApacheTrafficServer/6.2.3 [uScRs f p eN:t cCHi p s ])



Could you please verify this output?



__Vasanth



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10



From: Miles Libbey<mailto:***@apache.org>
Sent: Thursday, October 11, 2018 9:46 PM
To: ***@trafficserver.apache.org<mailto:***@trafficserver.apache.org>
Subject: Re: Query strings are can't stored in Cache storage ?



Can you send the list the header output of the various curls? eg

curl -IXGET "http://example.com/phpthatisntcaching.php"
and
curl -IXGET "http://example.com/cssthatiscaching.css"

in particular, the Cache-Control headers.
On Thu, Oct 11, 2018 at 5:56 AM Vasanth Mathivanan
Post by Vasanth Mathivanan
Hi,
__Vasanth
Sent from Mail for Windows 10
Miles Libbey
2018-10-12 13:19:26 UTC
Permalink
Your Cache-Control header does not allow for caching of your php --
you need to set this...


On Fri, Oct 12, 2018 at 12:30 AM Vasanth Mathivanan
Post by Vasanth Mathivanan
HTTP/1.1 200 OK
Date: Fri, 12 Oct 2018 07:22:45 GMT
Server: ATS/6.2.3
X-Powered-By: PHP/5.3.3
Set-Cookie: PHPSESSID=sgauuca5u1osm6nroeqgodlp52; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
This says the content expired long ago.
Post by Vasanth Mathivanan
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
This says, you may not cache this object under any circumstance.
Post by Vasanth Mathivanan
Pragma: no-cache
Content-Length: 2776
Content-Type: text/html; charset=UTF-8
Age: 0
Connection: keep-alive
Via: http/1.1 trafficserverurl.com (ApacheTrafficServer/6.2.3 [uScMsSf pSeN:t cCMi p sS])
HTTP/1.1 200 OK
Date: Fri, 12 Oct 2018 07:02:30 GMT
Server: ATS/6.2.3
Last-Modified: Mon, 08 Oct 2018 09:45:03 GMT
ETag: "2b137d-bdf7-577b479bf01bc"
Accept-Ranges: bytes
Content-Length: 48631
Content-Type: text/css
Age: 1250
Connection: keep-alive
Via: http/1.1 trafficserverurl.com (ApacheTrafficServer/6.2.3 [uScRs f p eN:t cCHi p s ])
Could you please verify this output?
__Vasanth
Sent from Mail for Windows 10
From: Miles Libbey
Sent: Thursday, October 11, 2018 9:46 PM
Subject: Re: Query strings are can't stored in Cache storage ?
Can you send the list the header output of the various curls? eg
curl -IXGET "http://example.com/phpthatisntcaching.php"
and
curl -IXGET "http://example.com/cssthatiscaching.css"
in particular, the Cache-Control headers.
On Thu, Oct 11, 2018 at 5:56 AM Vasanth Mathivanan
Post by Vasanth Mathivanan
Hi,
__Vasanth
Sent from Mail for Windows 10
Loading...