Resource icon

Add More Guest Page Cache Variations

semprot

Well-known member
semprot submitted a new resource:

Add More Guest Page Cache Variations - How to add more guest page cache variations

  • Open /xrc/XF/PageCache.php, backup a copy to your local computer.
  • Find these line (#261) :
    PHP:
    return 'page_' . sha1($uri) . '_' . strlen($uri) . "_s{$styleId}_l{$languageId}_v" . self::CACHE_VERSION;
  • Change into :
    PHP:
    return 'page_' . sha1($uri) . '_' . strlen($uri) . "_s{$styleId}_l{$languageId}_v" . self::CACHE_VERSION.'_c'.constant('MY_CUSTOM_VARIABLE');
  • Save.
Now you can have 1 more variation for guest page cache.
Read more about this resource...
 
What do I have to introduce under this extension because I think if it would have meaningful so had what the creators of Xenforo but already made from scratch.
 

semprot

Well-known member
Why do you manually edit XenForo files?
What for? This is bad.
You can use listener if you don't want to edit core file.

But i don't know how to use listener to extend guest cache part, so i choose to edit core file.

And i post this resource on "Development Tutorials", which mean users who browse here should know what they are doing, and is usually an add-on developer, not just common forum admins. :)
 
Top