如何告诉页面缓存忽略某些 URL 参数

How to tell page cache to ignore certain URL parameters

我们遇到一个问题,webadapter 页面缓存被 URLs 生成的不同条目填满,这些条目包含每个 URL.

唯一的 gclid 参数

这样的例子URL是 https://www.a1.hr/INTERSHOP/web/WFS/A1-Shop-Site/hr_HR/-/HRK/ViewStandardCatalog-Browse?campaignID=ljeto&gclid=EAIaIQobChMIiu7U2PGU8gIV2IeyCh311wBOEAEYASAAEgKQW_D_BwE&CatalogID=MobilePhones&CategoryName=MobilePhones

我们如何告诉页面缓存忽略 gclid 参数并在没有 glcid 的情况下缓存 URL 的结果,例如缓存键是: https://www.a1.hr/INTERSHOP/web/WFS/A1-Shop-Site/hr_HR/-/HRK/ViewStandardCatalog-Browse?campaignID=ljeto&CatalogID=MobilePhones&CategoryName=MobilePhones

share/system/config/cluster/webadapter.properies 文件中,您将找到一些示例代码:

## Defines a list of query attributes which are to be ignored
## in the page cache lookup. Mainly intended to ignore unwanted
## x/y coordinates, which are included with image button clicks.

# pagecache.ignore.0=submit.x
# pagecache.ignore.1=submit.y

使用 pagecache.ignore.n 应该可以解决问题。

知识库文章在这里:https://support.intershop.com/kb/index.php/Display/27984R