Wp-rocket: Query string caching with ignored parameter

Created on 9 Oct 2018  路  4Comments  路  Source: wp-media/wp-rocket

Based on this page, there are parameters that are ignore by default. For instance, gclid is one of them. According to that same page, it is also possible to cache query strings. The example on that page show country as an example.

From what I understand, the following URL:

http://www.mysite.com/?country=canada&gclid=1234

... should ignore the gclidparameter and serve the cache file from country=canada. This file shoud be located in:

wp-content/cache/wp-rocket/www.mysite.com/?country=canada/index.html

Instead, it is located in:

wp-content/cache/wp-rocket/www.mysite.com/?country=canada&gclid=1234/index.html

This means that gclid=1234 is not ignored when combined with a cached query string like country.

Am I missing something? I'm coding the rules for Rocket-Nginx and want to make sure I'm understanding the logic correctly. From what I understand, this is a bug. Is it?

cache low bug

All 4 comments

It's ignored if it's the only query string parameter in the URL. In that case, the process continues and the default cache version is used.

If there is another query string parameter that should be cached, the URL used for the cache will still be the full one, including all query string parameters.

It's confusing and not ideal I agree. Ignored parameters should probably be removed from the cache filename in all cases to prevent that.

I totally agree that it is confusing and not ideal. The way you describe what is done is exactly how I understood it.

It makes cache useless in most cases. This should be flag as a bug and fixed, IMHO.

Also, why do all 3 utm_* parameters are required to be considered ?

I believe because if the 3 are set, we can know for sure that it's for campaigns and we can ignore them safely. But now there is other parameters existing too, so this also needs to be improved.

Looks to be a similar case, however, the user was not caching any query strings. Caching was unexpected and caused some issues:

https://secure.helpscout.net/conversation/691607800/83647?folderId=1391600

Was this page helpful?
0 / 5 - 0 ratings