From e393ee1716de6a74cbfca7453b7d526ea2af4e0f Mon Sep 17 00:00:00 2001 From: croxton Date: Mon, 25 Jan 2016 10:33:15 +0000 Subject: [PATCH] Added stash_static_cache_index config option, to allow Stash to be used as a cache index only when static caching (i.e. no variable content is saved) --- .../third_party/stash/models/stash_model.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system/expressionengine/third_party/stash/models/stash_model.php b/system/expressionengine/third_party/stash/models/stash_model.php index 164f767..4eeacba 100755 --- a/system/expressionengine/third_party/stash/models/stash_model.php +++ b/system/expressionengine/third_party/stash/models/stash_model.php @@ -870,6 +870,13 @@ protected function insert_ignore_batch($table, array $data) { $_values = array(); + // static caching - save an index of the variable only? + if (ee()->config->item('stash_static_cache_index') + && $this->_can_static_cache($row['bundle_id'])) + { + $row['parameters'] = ''; // remove variable content + } + foreach ($row as $col => $val) { // add key