1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

Content: cache added for pages and blocks

This commit is contained in:
Awilum
2018-05-17 13:05:28 +03:00
parent 4052017777
commit f4ed09cfe7

View File

@@ -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)) {