As is, the code
$cache_key = 'search_results:' . md5(serialize($results));
if ($cache = $this->cacheManager->get($cache_key)) {
return $cache->data;
}
caches the full results set as part of the key, meaning the entire search process needs to run prior to fetching this cached data.
The cache check/retrieval/set should likely surround the call to search_fields in searchButton and be keyed to the search parameters in order to bypass the full search process if cached data is present.
Additionally, we'll need to at least have a configurable option to cache or not, and ideally, options to set number of cached entries and/or cache duration. These latter can be incremental improvements, but there needs to be the option to disable caching at the least.
cskeers β created an issue.
mytungsten β credited cskeers β .
This has been updated, and the current methodology is through config (as well as an "allow all" option).
mytungsten β credited cskeers β .