From d1b8f12ab3367afb881ffd8622d23acd24f317a1 Mon Sep 17 00:00:00 2001 From: Mohan Date: Tue, 26 Sep 2023 10:58:53 +0530 Subject: [PATCH 1/2] remove unwanted class --- src/ExpressionLanguageParserCache.php | 46 --------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/ExpressionLanguageParserCache.php diff --git a/src/ExpressionLanguageParserCache.php b/src/ExpressionLanguageParserCache.php deleted file mode 100644 index 7bb3d18..0000000 --- a/src/ExpressionLanguageParserCache.php +++ /dev/null @@ -1,46 +0,0 @@ -cache = Injector::inst()->get(CacheInterface::class . '.CacheInclude'); - } - - /** - * Saves an expression in the cache. - * - * @param string $key The cache key - * @param ParsedExpression $expression A ParsedExpression instance to store in the cache - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function save($key, ParsedExpression $expression) - { - $this->cache->set($key, $expression); - } - - /** - * Fetches an expression from the cache. - * - * @param string $key The cache key - * - * @return ParsedExpression|null - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function fetch($key) - { - return $this->cache->get($key) ?: null; - } -} From 793c92df6d6a24d99de55268e7cfc1394a2ab96f Mon Sep 17 00:00:00 2001 From: Mohan Date: Tue, 26 Sep 2023 13:22:31 +0530 Subject: [PATCH 2/2] Use correct cache adapter --- _config/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config/config.yml b/_config/config.yml index d60c1a7..51d90ef 100644 --- a/_config/config.yml +++ b/_config/config.yml @@ -17,7 +17,7 @@ SilverStripe\Core\Injector\Injector: CacheIncludeExpressionLanguage: class: 'Heyday\CacheInclude\ExpressionLanguage' constructor: - 0: '%$Heyday\CacheInclude\ExpressionLanguageParserCache' + 0: '%$Symfony\Component\Cache\Adapter\FilesystemAdapter' CacheIncludeConfig: class: 'Heyday\CacheInclude\Configs\ArrayConfig' CacheIncludeViewableDataProcessor: