ttempleton / craft-nocache Goto Github PK
View Code? Open in Web Editor NEWCraft CMS Twig extension to escape caching inside cache blocks
License: MIT License
Craft CMS Twig extension to escape caching inside cache blocks
License: MIT License
After upgrading to Craft 3.1.29, I get an error message. Looks like it might be an issue with Twig?
Here's my stack trace:
yii\base\ErrorException: Undefined property: __NoCacheTemplate_wV8vkIHXCbNb7qLynbvwRgxV::$macros in /Users/trav/Websites/louderthanten/storage/runtime/compiled_templates/nocache/nocache_wV8vkIHXCbNb7qLynbvwRgxV.php:32
Stack trace:
#0 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/ErrorHandler.php(81): yii\base\ErrorHandler->handleError(8, 'Undefined prope...', '/Users/trav/Web...', 32)
#1 /Users/trav/Websites/louderthanten/storage/runtime/compiled_templates/nocache/nocache_wV8vkIHXCbNb7qLynbvwRgxV.php(32): craft\web\ErrorHandler->handleError(8, 'Undefined prope...', '/Users/trav/Web...', 32, Array)
#2 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(395): __NoCacheTemplate_wV8vkIHXCbNb7qLynbvwRgxV->doDisplay(Array, Array)
#3 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(52): Twig\Template->displayWithErrorHandling(Array, Array)
#4 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(372): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#5 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(34): Twig\Template->display(Array, Array)
#6 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(380): craft\web\twig\Template->display(Array)
#7 /Users/trav/Websites/louderthanten/vendor/ttempleton/craft-nocache/src/Service.php(125): Twig\Template->render(Array)
#8 /Users/trav/Websites/louderthanten/storage/runtime/compiled_templates/56/560f6ac0d16afa691ecdacb7bafd36a4e23b8a8a07646d4ca8855efdb7a81ba0.php(90): ttempleton\nocache\Service->render('wV8vkIHXCbNb7qL...', Array)
#9 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(395): __TwigTemplate_80ce25d036746c5a80f6401c4f8735cd12058c891c02d669c400142ece8bf670->doDisplay(Array, Array)
#10 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(52): Twig\Template->displayWithErrorHandling(Array, Array)
#11 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(372): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#12 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(34): Twig\Template->display(Array, Array)
#13 /Users/trav/Websites/louderthanten/storage/runtime/compiled_templates/92/92d653e32be8eb6b3ed31d399e71d47f0ece64471626f756fe99ee1ff496d1a5.php(53): craft\web\twig\Template->display(Array)
#14 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(395): __TwigTemplate_5b9f84f560fb5f0542739f5bfee351b2cf5bd5b7a8ccbdadefae5aa15e374e62->doDisplay(Array, Array)
#15 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(52): Twig\Template->displayWithErrorHandling(Array, Array)
#16 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(372): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#17 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(34): Twig\Template->display(Array, Array)
#18 /Users/trav/Websites/louderthanten/storage/runtime/compiled_templates/ff/ffcba3b586bb42e969a8e1b04f69a88ffafd42c2c35b7c45d74d472c1ecd1ae1.php(78): craft\web\twig\Template->display(Array)
#19 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(184): __TwigTemplate_b9e3fbcfbb122ca9bf67081a9d023b6de676f892a77adbab0dc237ae71032856->block_content(Array, Array)
#20 /Users/trav/Websites/louderthanten/storage/runtime/compiled_templates/7a/7a14dbf2b7f4193a070b9d4b8617b1d154b3ff47a4c9d82ae70d5083999ceb95.php(290): Twig\Template->displayBlock('content', Array, Array)
#21 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(395): __TwigTemplate_c0c92959ea4a89bede0eb72f898a172d1b8a35402145337e09ca3998f13a5fdd->doDisplay(Array, Array)
#22 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(52): Twig\Template->displayWithErrorHandling(Array, Array)
#23 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(372): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#24 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(34): Twig\Template->display(Array, Array)
#25 /Users/trav/Websites/louderthanten/storage/runtime/compiled_templates/ff/ffcba3b586bb42e969a8e1b04f69a88ffafd42c2c35b7c45d74d472c1ecd1ae1.php(43): craft\web\twig\Template->display(Array, Array)
#26 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(395): __TwigTemplate_b9e3fbcfbb122ca9bf67081a9d023b6de676f892a77adbab0dc237ae71032856->doDisplay(Array, Array)
#27 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(52): Twig\Template->displayWithErrorHandling(Array, Array)
#28 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(372): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#29 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(34): Twig\Template->display(Array, Array)
#30 /Users/trav/Websites/louderthanten/storage/runtime/compiled_templates/4a/4a8efde7b19e4467ac443070da971fdd513ce5499ee15b9cd302851e58150797.php(42): craft\web\twig\Template->display(Array)
#31 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(395): __TwigTemplate_949213e301cec562e111d67922ec5fe90b30a8b71f8f1e9b22048afa7b39296a->doDisplay(Array, Array)
#32 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(52): Twig\Template->displayWithErrorHandling(Array, Array)
#33 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(372): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#34 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/twig/Template.php(34): Twig\Template->display(Array, Array)
#35 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Template.php(380): craft\web\twig\Template->display(Array)
#36 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)
#37 /Users/trav/Websites/louderthanten/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)
#38 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/View.php(343): Twig\Environment->render('index', Array)
#39 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/View.php(393): craft\web\View->renderTemplate('index', Array)
#40 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/Controller.php(161): craft\web\View->renderPageTemplate('index', Array)
#41 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/controllers/TemplatesController.php(78): craft\web\Controller->renderTemplate('index', Array)
#42 [internal function]: craft\controllers\TemplatesController->actionRender('index', Array)
#43 /Users/trav/Websites/louderthanten/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#44 /Users/trav/Websites/louderthanten/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#45 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('render', Array)
#46 /Users/trav/Websites/louderthanten/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('render', Array)
#47 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('templates/rende...', Array)
#48 /Users/trav/Websites/louderthanten/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('templates/rende...', Array)
#49 /Users/trav/Websites/louderthanten/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request))
#50 /Users/trav/Websites/louderthanten/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#51 /Users/trav/Websites/louderthanten/public/index.php(21): yii\base\Application->run()
#52 /Users/trav/.composer/vendor/laravel/valet/server.php(158): require('/Users/trav/Web...')
#53 {main}
With HTML Cache enabled, even with none of it's option enabled,
{% nocache %}{{ getCsrfInput() }}{% endnocache %}
renders correctly the first time, but as:
3HkJuIQdEFS4Rvv50KnpVs3s-fIhF5j7S
on all subsequent page loads. With HTML Cache disabled the form works fine.
No-Cache version: Latest craft-2 commit.
Craft CMS version: 2.8.0.1
PHP version: 7.2.24
Also using HTML Cache 1.0.4.1
I know you're probably barely supporting the Craft 2 version, but just wanted to let you know that a brand new bug has been introduced by a recent version of Craft 2.
Fatal error: Uncaught TypeError: Argument 1 passed to __NoCacheTemplate_okg3IDPFLZ6ciU7ZHH8N0N6H::__construct() must be an instance of Environment, instance of Craft\TwigEnvironment given, called in /.../craft/plugins/nocache/services/NoCacheService.php on line 98 and defined in /.../craft/storage/runtime/compiled_templates/nocache/nocache_okg3IDPFLZ6ciU7ZHH8N0N6H.php:6
Stack trace:
#0 /.../craft/plugins/nocache/services/NoCacheService.php(98): __NoCacheTemplate_okg3IDPFLZ6ciU7ZHH8N0N6H->__construct(Object(Craft\TwigEnvironment))
#1 /.../craft/plugins/nocache/NoCachePlugin.php(116): Craft\NoCacheService->render('okg3IDPFLZ6ciU7...', 'xwy4NJxt')
#2 [internal function]: Craft\NoCachePlugin->Craft\{closure}(Array)
#3 /.../craft/plugins/nocache/NoCachePlugin.php(123): preg_replace_callback('/<no-cache>([a-...', Object(Closure), '<!doctype html>...')
#4 [ in /.../craft/storage/runtime/compiled_templates/nocache/nocache_okg3IDPFLZ6ciU7ZHH8N0N6H.php on line 6
I'll try to hack the plugin in the meantime.
How would I have to write the nocache tag when using a Macro?
{% nocache %}
{% for asset in header.headerBild.order('RAND()').limit('1') %}
{{ docMacro.headerImage(asset) }}
{% endfor %}
{% endnocache %}
I just imported the macro file again:
But is there another sollution like { with: docMacros }
or something?
{% nocache %}
{% import '_incl/docMacros' as docMacro %}
{% for asset in header.headerBild.order('RAND()').limit('1') %}
{{ docMacro.headerImage(asset) }}
{% endfor %}
{% endnocache %}
I have my storage folder above the craft folder like this:
After installing the plugin and enabling it in the template files the plugin gives me this error: mkdir(): Permission denied.
I tried creating a nocache folder inside de runtime folder with the right permissions. But still same error.
PHP warning
mkdir(): Permission denied
/Volumes/HDD/Sites/myredlight/craft/app/helpers/IOHelper.php(734)
722 {
723 if ($permissions == null)
724 {
725 $permissions = craft()->config->get('defaultFolderPermissions');
726 }
727
728 $path = static::normalizePathSeparators($path);
729
730 if (!static::folderExists($path, false, $suppressErrors))
731 {
732 $oldumask = $suppressErrors ? @umask(0) : umask(0);
733
734 if ($suppressErrors ? !@mkdir($path, $permissions, true) : !mkdir($path, $permissions, true))
735 {
736 Craft::log('Tried to create a folder at '.$path.', but could not.', LogLevel::Error);
737 return false;
738 }
739
740 // Because setting permission with mkdir is a crapshoot.
741 $suppressErrors ? @chmod($path, $permissions) : chmod($path, $permissions);
742 $suppressErrors ? @umask($oldumask) : umask($oldumask);
743 return new Folder($path);
744 }
745
746 Craft::log('Tried to create a folder at '.$path.', but the folder already exists.', LogLevel::Error);
Stack Trace
#0
– /Volumes/HDD/Sites/myredlight/craft/app/etc/web/WebApp.php(688): CApplication->handleError(2, "mkdir(): Permission denied", "/Volumes/HDD/Sites/myredlight/craft/app/helpers/IOHelper.php", 734)
683 if (version_compare(PHP_VERSION, '7', '>=') && $code === 2 && strpos($message, 'should be compatible with') !== false)
684 {
685 return;
686 }
687
688 parent::handleError($code, $message, $file, $line);
689 }
690
691 // Private Methods
692 // =========================================================================
693
#1
unknown(0): Craft\WebApp->handleError(2, "mkdir(): Permission denied", "/Volumes/HDD/Sites/myredlight/craft/app/helpers/IOHelper.php", 734, ...)
#2
– /Volumes/HDD/Sites/myredlight/craft/app/helpers/IOHelper.php(734): mkdir("../../storage/runtime/", 509, true)
729
730 if (!static::folderExists($path, false, $suppressErrors))
731 {
732 $oldumask = $suppressErrors ? @umask(0) : umask(0);
733
734 if ($suppressErrors ? !@mkdir($path, $permissions, true) : !mkdir($path, $permissions, true))
735 {
736 Craft::log('Tried to create a folder at '.$path.', but could not.', LogLevel::Error);
737 return false;
738 }
739
#3
– /Volumes/HDD/Sites/myredlight/craft/app/helpers/IOHelper.php(1502): Craft\IOHelper::createFolder("../../storage/runtime/", 509, false)
1497 */
1498 public static function ensureFolderExists($folderPath, $suppressErrors = false)
1499 {
1500 if (!IOHelper::folderExists($folderPath, false, $suppressErrors))
1501 {
1502 IOHelper::createFolder($folderPath, craft()->config->get('defaultFolderPermissions'), $suppressErrors);
1503 }
1504 }
1505
1506 /**
1507 * Cleans a filename.
#4
– /Volumes/HDD/Sites/myredlight/craft/app/services/PathService.php(81): Craft\IOHelper::ensureFolderExists("../../storage/runtime/")
76 * @return string The path to the craft/storage/runtime/ folder.
77 */
78 public function getRuntimePath()
79 {
80 $path = $this->getStoragePath().'runtime/';
81 IOHelper::ensureFolderExists($path);
82
83 if (!IOHelper::fileExists($path.'.gitignore'))
84 {
85 IOHelper::writeToFile($path.'.gitignore', "*\n!.gitignore\n\n", true);
86 }
#5
+ /Volumes/HDD/Sites/myredlight/craft/app/services/PathService.php(354): Craft\PathService->getRuntimePath()
#6
+ /Volumes/HDD/Sites/myredlight/plugins/nocache/services/NoCacheService.php(20): Craft\PathService->getCompiledTemplatesPath()
#7
+ /Volumes/HDD/Sites/myredlight/plugins/nocache/services/NoCacheService.php(90): Craft\NoCacheService->getCompilePath("o7Yyxd8CkaPY72PV4Fnu6LhS")
#8
+ /Volumes/HDD/Sites/myredlight/plugins/nocache/NoCachePlugin.php(107): Craft\NoCacheService->render("o7Yyxd8CkaPY72PV4Fnu6LhS", "mwm9BRFP")
#9
unknown(0): Craft\NoCachePlugin->Craft\{closure}(array("<!--nocache-o7Yyxd8CkaPY72PV4Fnu6LhS-mwm9BRFP-->", "o7Yyxd8CkaPY72PV4Fnu6LhS", "mwm9BRFP"))
#10
+ /Volumes/HDD/Sites/myredlight/plugins/nocache/NoCachePlugin.php(109): preg_replace_callback("/<!--nocache-([a-z0-9]+)-([a-z0-9]+)-->/i", Closure, " <!DOCTYPE html> <!--[if IE 9]><html class="lt-ie10" lang="en" >...")
#11
unknown(0): Craft\NoCachePlugin->Craft\{closure}()
Since nocache uses an HTML comment as its "key", it gets stripped if using {% minify %} to compress the HTML response before being saved to the cache.
https://github.com/nystudio107/minify
Is it worth considering another syntax for the key?
I've had issues where, in production running OPCache, I've cleared the template cache from the Admin Control Panel, gone back to the front-end of the site and my no-cache blocks are completely empty and breaking quite a lot of the site.
This is only cleared by restarting PHP, thus restarting OPCache.
Is this something you're aware of, or know a better way of dealing with clearing template caches with OPCache enabled?
We've updated a Craft 2 site from 2.7.6 -> 2.7.7 (and above) and it seems to be introducing breaking changes with the nocache plugin. It's giving us the following error anywhere we use this plugin within the Twig templates.
We noticed starting in Craft 2.7.7 that Twig was updated to 1.38.4. Based on the error in the screenshot attached, we believe that may be the issue.
I am having a setup, where I cache a whole entry page. Within certain pages, I have a form field, which I want to exclude from cache.
My code looks basically like this:
_entry.twig
<div class="entry-page-contact">
{% cache %}
{% include 'voan/_includes/breadcrumb' %}
{% include 'voan/_includes/_fields/form' %}
{% endcache %}
</div>
form.twig
{% if entry.form %}
{% nocache with {entry: entry} %}
<div class="field-form">
...
</div>
{% endnocache %}
{% endif %}
While having this setup, I get an Exception Serialization of 'Closure' is not allowed
: in /var/www/vendor/yiisoft/yii2/caching/Cache.php at line 249 – serialize([['entry' => benf\neo\elements\Block], null])
I have an include file which contains JS via {% js %} tags
This include file is inside {% nocache %} tags
The JS is not being output on the page. It was all fine before using nocache
Can it be linked to this?
I have the problem that things inside the nocache tag becomes cached.
It's a onepager, every section is a entry and inside of that i have a neo field.
The Code
{% cache globally using key "home-" ~ craft.app.request.pathInfo %}
{%- minify -%}
{% for entry in entry.siteSection.all() %}
<section id="{{ entry.navTitle | kebab }}">
{% if entry.bodyMain is defined and entry.bodyMain | length %}
{% for block in entry.bodyMain.all() %}
{% switch block.type.handle %}
{% case 'callTeam' %}
{% nocache %}
{% set team = craft.entries.section('team').order('RAND()').all() %}
{% for entry in team %}
{% switch entry.type %}
{% case 'team' %}
Code
{% case 'job' %}
Code
{% case 'default' %}
{% endswitch %}
{% endfor %}
{% endnocache %}
{% endswitch %}
{% endfor %}
{% endif %}
</section>
{% endfor %}
{%- endminify -%}
{% endcache %}
In my template: {{ entry.url }}
outputs the url.
If I write:
{% nocache %}
{{ entry.url }}
{% endnocache %}
I get
Variable "entry" does not exist in "_pages/index" at line 16.
Using the {% nocache %}
around an {% embed %}
tag throws a yii\base\ErrorException
:
Cannot declare class __TwigTemplate_58ca26ca050e28ccd1000e621e244e86d4395a3d535ac28fb668ef8f85a11918, because the name is already in use
To reproduce, create the following templates and navigate to /nocache
.
templates/nocache/index.twig:
{% nocache %}
{% embed 'nocache/_list.twig' with { heading: 'Drinks' } %}
{% block listItems %}
{% include 'nocache/_item.twig' with { name: 'Beer' } %}
{% include 'nocache/_item.twig' with { name: 'Orange juice' } %}
{% include 'nocache/_item.twig' with { name: 'Water' } %}
{% endblock %}
{% endembed %}
{% endnocache %}
_templates/nocache/list.twig:
<h1>{{ heading }}</h1>
<ul>
{% block listItems %}{% endblock %}
</ul>
_templates/nocache/item.twig:
<li>{{ name }}</li>
Users get logged out (path: domain.com/logout) but are being presented with a PHP notice:
Notice: ob_clean(): failed to delete buffer of zlib output compression (1) in /var/www/virtual/user/craft/app/framework/base/CErrorHandler.php on line 112
in
ob_get_clean(): failed to discard buffer of zlib output compression (1)
/var/www/virtual/user/craft/plugins/nocache/NoCachePlugin.php(101)
089 // 1. Only enable the plugin's functionality if template caching is enabled
090 // 2. Watch for `nocache` blocks only if it's a site request
091 if(craft()->noCache->isCacheEnabled() && craft()->request->isSiteRequest())
092 {
093 // Working directory may change during `register_shutdown_function`, so let's deal with that by caching the
094 // current working directory to a constant
095 define('NOCACHEPLUGIN_CWD', getcwd());
096
097 // Capture the raw request output right before it's sent to the requester
098 register_shutdown_function(function()
099 {
100 $devMode = craft()->config->get('devMode');
101 $output = ob_get_clean();
(…)
Happens in devMode, did not test in production.
Fatal error: Uncaught TypeError: Argument 1 passed to __NoCacheTemplate_cmEum55xsrZjI4i7Hc2xwioM::__construct() must be an instance of Environment, instance of Craft\TwigEnvironment given
Also using HTML Cache 1.0.4.1
I've found that importing a macro using _self
inside a nocache
tag throws an error.
For example, if you have template_example.twig
with a macro defined at the top, then this fails.
{% macro rendyEntry(entry) %}
...macro code here
{% endmacro %}
{% nocache %}
{% import _self as macros %}
...
However, importing them from a different file works as expected.
{% nocache %}
{% import "_partials/macros" as macros %}
...
Handy plugin! 👍
When viewing a page that uses the nocache plugin, user can add a invalid token to the URL to change the output chunk to a number string.
x-craft-preview
and token
token
set to anything (e.g., "token=1"). For instance, www.example.com has a news feed with nocache. Update url to www.example.com?token=testIn some circumstances, array values are not getting passed into the nocache
block (scalar values seem to be working fine), and array-related Twig filters (like |merge
) inside the nocache
block are complaining about the input not being an array.
I'm not able to reproduce this consistently right now, but the following steps should be a starting point. Will add updates as soon as I can.
nocache
block that uses array values from outside it.set arr = arr|merge('[]')
).2.0.7
3.5.19.1
7.4.19
If I add nochache around the craft form plugin. It disapears completely:
{% nocache %}
{% include "_organisms/form/contactForm" %}
{% endnocache %}
Installing the plugin locally, then using project config to sync to live production fails:
./craft project-config/sync Installing plugin "nocache" ... error: Calling unknown method: craft\console\Request::getToken() Aborting config sync
After upgrading to Craft 3.1.24, attempting to compile a No-Cache template will cause an error.
Thanks to @pvldigital for alerting me to this!
nocache is a really helpful plugin to get more flexibility with caching in Craft. Are there any plans to create a version for Craft 3?
Hiya,
Take the following
{% cache globally using key 'cache__key' for 1 month %}
Cache me
{% nocache %}
Do not cache me
{% endnocache %}
{% endcache %}
This caches in craft_templatecaches
as cache__key
with a body of cache me <no-cache>3HkJuIQdEFS4Rvv50KnpVs3s-fIhF5j7S</no-cache>
, which seems correct to me.
However, if I update the 'Do not cache me' text, the nocache block doesn't update. If I do not use a key
then it updates correctly.
So this leads me to believe that it is not possible to use key
parameter with no cache?
Thanks
After upgrading to Craft 3.1.19 from an earlier 3.1 release, I receive the following error related to No-Cache:
Argument 1 passed to __NoCacheTemplate_ZE9TbMSaN1OaMzFMumUHIwPo::__construct() must be an instance of Environment, instance of craft\web\twig\Environment given, called in /app/vendor/ttempleton/craft-nocache/src/Service.php on line 112
I am guessing that this is related to the recent Twig 2.7.x changes.
Any help or direction is much appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.