ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Tag Caching and Pagination

May 02, 2012 1:14am

Subscribe [2]
  • #1 / May 02, 2012 1:14am

    Bransin

    157 posts

    EE v2.4.0
    Structure 3.2.0

    {exp:channel:entries site="thesite" channel="blog" dynamic="no" limit="10" paginate="bottom" paginate_base="blog" orderby="entry_date" cache="yes" refresh="10"}
    
    {paginate}
     Page {current_page} of {total_pages} pages {pagination_links}
    {/paginate}
    
    <h2><a href="http://{page_uri}">{title}</a></h2>
    
    <p>{blog_summary}</p>
    
    <p>{/exp:channel:entries}

    The Problem
    Viewing template in blog/index (http://eetestexample.com/blog)

    Let’s say there are 17 entries. When visiting the above url http://eetestexample.com/blog the returned entries are page 2 when viewing the blog index. The pagination reflects this as well. When clicking pagination 1 link the same page 2 results are returned obviously. Basically stuck in page 2 limbo. When removing the cache parameters from the channel entries tag, everything works fine.

    Let’s say I keep these cache parameters after clearing all caches and refreshed the browser. Now I’m stuck on page 1. Maybe I’m answering my own question, but based on these tests, it shows that tag caching doesn’t support pagination and that tag caching saves the latest instance whether it be page 1 or 2.

    If I remember correctly or maybe just delusional, the legacy docs at one time had a more elaborate explanation on EE caching and performance. Current index anchor links are broken on this page, and I’ve looked it over thoroughly not knowing caching limitations - http://ellislab.com/expressionengine/user-guide/general/caching.html

    The whole concept of performance and limitations are confusing, and the user guide is rather sparse right now. Does template caching work with pagination? I don’t know.. I guess we’ll find out now with more testing.

    It would be nice to know these things in the user guide.

     

  • #2 / May 02, 2012 12:57pm

    Shane Eckert

    7174 posts

    Hello Bransin,

    I am sorry to hear you are running into this problem.

    I enabled Template Caching on a similar setup to the one you have described and I am not getting the same results. With caching on pagination is not effected.

    Structure hinders some of ExpressionEngine’s caching, as well as most navigation. I do not have structure or I would try and reproduce this. The good news is that Cache Cracker can help in this area.

    I hope this helps.

    Please let me know if there is anything else I can help you with.

    Cheers!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases