Looks like caching paginated content globally forces any following pages (p2,p3, etc) to just echo the same content as the first page. Using a regular cache
tag works as desired, but I don't want to cache the same content across all locales, nor generate new cache any time the same template is accessed through one of the several locales. Has anyone run into this? Is this a problem or am I confusing the functionality of the cache globally
tag?
Add a comment
|
1 Answer
I ran into this today. I thought craft.request.path
used to include the pagination page number but it doesn't appear to anymore. Maybe it was always like this though.
Regardless, this is how I'm now handling it:
{% cache globally using key craft.request.path ~ '/p' ~ craft.request.getPageNum %}
...
{% endcache %}