Menu

#100 DBPager::cacheQueries fix

Core Class
closed-fixed
Code/Logic (73)
5
2008-07-14
2008-07-13
Eloi George
No

DBPager::cacheQueries is very nice. However, there is a problem if a user queries different pager objects using the same template.

Example: JoeBob pulls up a listing of topics in forum #1 on one browser window & a listing of forum #2 on another. If he leaves forum #1 to look at an item, then looks at page 2 on forum #2, then leaves the itemview in the first window to go back to forum #1, the cache will cause him to see page 2 of forum #1 (which he hasn't been to).

This patch adds a method (DBPager::setCacheIdentifier()) which will allow you to set unique identifiers for every type of pager view (ex: "forumview_1" & "forumview_2"). If an identifier is not set, it defaults back to the template name.

Discussion

  • Eloi George

    Eloi George - 2008-07-13

    Patch to /core/class/DBPager.php

     
  • Anonymous

    Anonymous - 2008-07-14

    Logged In: YES
    user_id=400519
    Originator: NO

    thanks for the patch. added to svn

     
  • Anonymous

    Anonymous - 2008-07-14
    • status: open --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.