diff --git a/src/TwigExtension.php b/src/TwigExtension.php index 288fe40..d27fb58 100644 --- a/src/TwigExtension.php +++ b/src/TwigExtension.php @@ -15,7 +15,7 @@ public function getGlobals() { return [ 'upper' => [ - 'cache' => new CacheResponse(\Craft::$app->getResponse()) + 'cache' => \Craft::createObject(CacheResponse::class, [\Craft::$app->getResponse()]), ] ]; }