Hi,
I have added the below configuration for ignoreUrl Params in my farm.any file:
/ignoreUrlParams
{
/0001 { /glob "*" /type "allow" }
}
And explicitly denied the expected query parameters from being ignored .But whenever I am trying to hit a URL with query parameter it is not getting cached and served from my publisher only.
Is there anything else needs to be done for this to work?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Hi @kanikaa32870678
Dispatcher module is correctly configured to use the farm.any file. The Dispatcher module's configuration (typically in the httpd.conf file) should include a line like:
DispatcherConfigFile "/path/to/your/farm.any"
After making changes to the farm.any file, make sure to restart your web server or reload the configuration to apply the changes. Some changes in the Dispatcher configuration may not take effect until the web server is restarted.
Dispatcher Flush Agent:
If you are testing cache changes, consider using the Dispatcher Flush Agent to invalidate and flush specific URLs or cache paths. This can help ensure that you are observing the effects of your configuration changes.
Thanks.
suppose if you have written these under /ignoreUrlParams then all URLs are cached. if the Query Parameter has q or abc then, that URL will not be cached.
/0001 { /glob "*" /type "allow" }
/0002 { /glob "q" /type "deny" }
/0003 { /glob "abc" /type "deny" }
Now are you using multiple parameters? i.e. mean hello.html?test=123&q=hi
In this case, since the URL has q as one of the query parameter, then the page will not be cached.
As per your dispatcher ignoreUrlParams configuration, any URL which has at least one URL param from the deny list is not cached and sent to publish server to process the page request.
At the same any other URL even with query parameters which not in the deny list are cached.
Hope this helps!
Hi @kanikaa32870678
Dispatcher module is correctly configured to use the farm.any file. The Dispatcher module's configuration (typically in the httpd.conf file) should include a line like:
DispatcherConfigFile "/path/to/your/farm.any"
After making changes to the farm.any file, make sure to restart your web server or reload the configuration to apply the changes. Some changes in the Dispatcher configuration may not take effect until the web server is restarted.
Dispatcher Flush Agent:
If you are testing cache changes, consider using the Dispatcher Flush Agent to invalidate and flush specific URLs or cache paths. This can help ensure that you are observing the effects of your configuration changes.
Thanks.
Hi @kanikaa32870678 ,
You can also enable the dispatcher debug logs to see what is happening on each of the requests and whether its honoring your changes. The config looks good and it should cache the query paramed urls on first hit and should serve from there expect for the explicit denied ones.
Could be an issue with Apache not picking you latest changes
https://blogs.perficient.com/2017/10/12/mastering-aem-dispatcher-part-1-debugging-the-dispatcher/
Views
Likes
Replies