<p>I ran into this today. I thought <code>craft.request.path</code> used to include the pagination page number but it doesn't appear to anymore. Maybe it was always like this though.</p>

<p>Regardless, this is how I'm now handling it:</p>

<pre><code>{% cache globally using key craft.request.path ~ '/p' ~ craft.request.getPageNum %}
...
{% endcache %}
</code></pre>

CC BY-SA 3.0
2015-09-15T10:45:00.850Z
2015-09-15T10:45:00.850Z
Jamie Pittock
<p>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 <code>cache</code> 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 <code>cache globally</code> tag?</p>

<cache><pagination>
Troubleshooting paginated content cached globally
# Troubleshooting paginated content cached globally

(Asked by: username_0 on 2015-08-26)

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?

**Tags:** cache, pagination


---

## 1 answers

### Answer by username_1 on 2015-09-15. Score: 10 | Accepted 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 %}


---

