// 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