Hi,
I'm trying to make the query string to be cached in dispatcher in separated files. Have read an article about Configuring Dispatcher, I tried
/ignoreUrlParams { /0003 { /glob "*" /type "allow" } }
but it keeps caching one files instead of multiple files as I'm trying to used many queries. For example:
I tried: mywebsite.com/homepage.html?x=1 and mywebsite.com/homepage.html?y=2, but the cache only have homepage.html
Is there any way to make multiple caches by different queries?
Any help would be appreciated.
My apache version is 4.2.2.
Many thanks,
Manh
Solved! Go to Solution.
I would more do something like homepage.y.3.html
The ignoreUrlParams setting ignores the query string and caches the page as if the query string wasn't in the URL. Normally the ignoreURLParameters is used to impact query parameters that don't impact the HTML to be returned, but rather impact the display client side or are used for analytic purposes.
If you want to cache all the variations based on the query string you will have to rewrite them to selectors or something similar.
Hi kautuksahni,
Thanks for your reply.
From what you suggest, you mean that I need to rewrite the url to be something like:
"mywebsite.com/homepage.html?y=2" to "mywebsite.com/homepage/y/2"
Is that correct? If so, is there any guide/document on how to do it? I'm new on configure dispatcher, so any help would be appreciated.
Thanks,
Manh
Views
Replies
Total Likes
As you are new to Dispathcer - I strongly recommend that you watch these webinars that will teach you a lot:
Optimizing the CQ Dispatcher Cache
Thanks for your reply.
From your webinars, I learned that dispatcher only cached the urls with extension (.html). So I tried
mywebsite.com/homepage.html/x/3 ---> will not be cached
mywebsite.com/homepage.html/x/3.html ---> will be cached [1]
But I have a problem, if [1] is cached, when I try to access mywebsite.com/homepage.html, it returns 404. Is it because of homepage.html is a directory, not file anymore? and is there anyway to resolved it? Appreciated for your help.
Thanks.
Views
Replies
Total Likes
I would more do something like homepage.y.3.html
Thanks Feike.
Currently I'm doing the query string for filter, and it call the REST API service for getting the data. Is your way applied for REST API services? And Is there any document/guide on how to apply the queries for REST services?
Thanks in advanced,
Manh
Views
Replies
Total Likes
So the answer looks like it's not possible.
Dispatcher caches assets and html files. Caching query string could create a DDOS scenario.
Views
Replies
Total Likes
Actually caching a query string is forbidden by the HTTP RFCs.
Views
Replies
Total Likes