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

feat(core): Markdown parsing should be cached in production #287

This commit is contained in:
Awilum
2019-11-12 17:31:56 +03:00
parent 2be14e0284
commit c358ff0abf

View File

@@ -103,7 +103,7 @@ class Parser
{
switch ($parser) {
case 'frontmatter':
if ($cache) {
if ($cache == true && $this->flextype['registry']->get('settings.cache.enabled') == true) {
$key = md5($input);
if ($data_from_cache = $this->flextype['cache']->fetch($key)) {
@@ -120,7 +120,7 @@ class Parser
break;
case 'json':
if ($cache) {
if ($cache == true && $this->flextype['registry']->get('settings.cache.enabled') == true) {
$key = md5($input);
if ($data_from_cache = $this->flextype['cache']->fetch($key)) {
@@ -137,7 +137,7 @@ class Parser
break;
case 'yaml':
if ($cache) {
if ($cache == true && $this->flextype['registry']->get('settings.cache.enabled') == true) {
$key = md5($input);
if ($data_from_cache = $this->flextype['cache']->fetch($key)) {
@@ -154,7 +154,7 @@ class Parser
break;
case 'markdown':
if ($cache) {
if ($cache == true && $this->flextype['registry']->get('settings.cache.enabled') == true) {
$key = md5($input);
if ($data_from_cache = $this->flextype['cache']->fetch($key)) {