Skip to content

Uncached FLUID viewhelper

24. May 2015

PROBLEM
Make parts of your typo3 fluid template uncached. E.g. disable the cache for them, without using “no_cache” or USER_INT or COA_INT.
Why? To display different FLUID templates for mobile and desktop clients. Or simply to display the current time on the website.

CAUSE
The fluid template engine offers no native command to uncache partials.

SOLUTION
Install this Extension: “vhs”
Get it here: http://typo3.org/extensions/repository/view/vhs

It provides a viewhelper called “render.uncache”, that allows uncaching of partial.
See https://fluidtypo3.org/viewhelpers/vhs/2.1.4/Render/UncacheViewHelper.html for more information.

USAGE

 <v:render.uncache section="MySection" partial="MyPartial" arguments="{_all}"/>

RELATED
http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2012-September/012878.html
http://typo3.3.n7.nabble.com/Do-not-cache-part-of-Fluid-template-How-to-td251880.html

Advertisements

From → Typo3

Leave a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: