config = $config; } public function shouldCache( ParserOutput $output, PageRecord $page, ParserOptions $options ): bool { $ns = $page->getNamespace(); $cpuMin = $this->config[ $ns ]['minCpuTime'] ?? ( $this->config['default']['minCpuTime'] ?? 0 ); $cpuTime = $output->getTimeProfile( 'cpu' ); if ( $cpuTime !== null && $cpuTime < $cpuMin ) { return false; } return true; } }