From f4ed09cfe78aac00858c31662b000102b600c41a Mon Sep 17 00:00:00 2001 From: Awilum Date: Thu, 17 May 2018 13:05:28 +0300 Subject: [PATCH] Content: cache added for pages and blocks --- flextype/Content.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flextype/Content.php b/flextype/Content.php index aaf07258..dfc59fed 100755 --- a/flextype/Content.php +++ b/flextype/Content.php @@ -279,7 +279,11 @@ class Content $block_path = PATH['blocks'] . '/' . $block_name . '.md'; // Block cache id - $block_cache_id = md5('block' . filemtime($block_path) . (($raw === true) ? 'true' : 'false')); + $block_cache_id = ''; + + if (Filesystem::fileExists($block_path)) { + $block_cache_id = md5('block' . filemtime($block_path) . (($raw === true) ? 'true' : 'false')); + } // Try to get block from cache if (Cache::driver()->contains($block_cache_id)) {