[RSS Feed/News] Unable to extend \XF\PageCache

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
We need to overwrite the cache ID for requests made by a certain user agent to prevent the page header / navigation from being rendered. I'm currently able to accomplish this by doing the following:

PHP:

Code:
/** @var PageCache|null $pageCache */
$pageCache = $app->container('pageCache');
if ($pageCache) {
    try {
        $pageCache->setCacheIdGenerator(function(Request $request) {
            $options = \XF::options();

            $styleId = intval($request->getCookie('style_id'...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom