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:03:49 +03:00
parent 244aa80ce4
commit 4052017777

View File

@@ -139,8 +139,12 @@ class Content
$file_path = PATH['pages'] . '/' . $url . '/page.md';
}
$page_cache_id = '';
// Page cache id
$page_cache_id = md5('page' . filemtime($file_path) . (($raw === true) ? 'true' : 'false'));
if (Filesystem::fileExists($file_path)) {
$page_cache_id = md5('page' . filemtime($file_path) . (($raw === true) ? 'true' : 'false'));
}
// Try to get page from cache
if (Cache::driver()->contains($page_cache_id)) {