diff --git a/inc/functions.php b/inc/functions.php index ab43210b..5457cc5f 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1690,6 +1690,14 @@ function buildIndex($global_api = "yes") { if (!$content) break; + if ($config['cache']['enabled']) { + $contentHash = md5(json_encode($content['threads'])); + $cacheHit = cache::get('index_cache'. $contentHash); + if ($cacheHit) + continue; + cache::set('index_cache'. $contentHash, "processed", 3600); + } + // json api if ($config['api']['enabled']) { $threads = $content['threads'];