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

smozgur

Well-known 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?

Thanks.
 
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:

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

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