cstudios / turbo
This plugin utilizes the PageCache filter from yii2 into your craft 3 instance
Installs: 306
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 0
Forks: 0
Open Issues: 1
Type:craft-plugin
Requires
- php: ^7.0|^8.0
- craftcms/cms: ^3.0.0|^4.0
README
This plugin utilizes the PageCache filter from yii2 into your craft 3 instance
Logo partially made by monkik from www.flaticon.comRequirements
This plugin requires Craft CMS 3.0.0-beta.23 or later. This plugins also supports Craft 4.
Installation
composer require cstudios/turbo
And add the following lines to your app.php
or app.web.php
config file
'components' => [ 'view' => [ 'class' => 'craft\web\View', 'allowEval' => true ] ]
You can now exclude urls using the following configuration ( inside your app.php
file )
'params' => [ 'turbo' => [ 'excludedUrls' => [ '/index', '/channel/*' ] ] ]
You can use wildcarded urls as well with the asterisk (*) character
Note:
If you have some dynamic contents on your site, you want to be excluded from page caching then you can use the following code:
{{ craft.turbo.renderDynamic('csrfInput()') | raw }}
To make it easier for you, we've already implemented csrfInput into this plugin, so you just have to use:
{{ craft.turbo.csrfInput() | raw }}
Brought to you by Gergely Horvath
Supported by ❤️ Cstudios s.r.o.