From 467979aa77c588252e0ea7fc439fb477f12c4357 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 23 May 2017 11:54:36 -0400 Subject: [PATCH] Fixed cache logic not checking for the shortcode name when processing shortcode list looking for cache control data. --- controllers/front.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/controllers/front.php b/controllers/front.php index 276d555d..ea329d5f 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -292,13 +292,14 @@ class glmMembersFront extends GlmPluginSupport // Check shortcode for cache configuration $scCacheControl = false; foreach ($this->config['addOns'] as $addon) { - foreach ($addon['shortcodes'] as $sc) { - if (isset($sc['cacheControl'])) { - $scCacheControl = $sc['cacheControl']; + while (list($key, $val) = each($addon['shortcodes'])) { + if ($key == $shortcode && isset($val['cacheControl'])) { + $scCacheControl = $val['cacheControl']; } } } + // If cache control is enabled for this shortcode if ($scCacheControl && $scCacheControl['active']) { // Create cache_code for this request -- 2.17.1