XF 2.1 Disable caching of custom widget content in the guest page cache?


Active member
I built a custom widget to display dynamic content and I don't want its content to be cached with the page.

Is it possible to exclude the widget content from the guest page cache?


Jeremy P

XenForo developer
Staff member
Not really. Guest caching works by caching the output HTML in its entirety. You could disable guest caching completely on pages with the widget by setting:

\XF\Pub\App::$allowPageCache = false;

Alternatively, I suppose you might be able to load the widget content via AJAX.