public getSpellingType ( Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface $request ) | ||
$request | Smile\ElasticsuiteCore\Api\Search\Spellchecker\RequestInterface |
public function getSpellingType(RequestInterface $request)
{
$cacheKey = $this->getCacheKey($request);
$spellingType = $this->cacheHelper->loadCache($cacheKey);
if ($spellingType === false) {
$spellingType = $this->loadSpellingType($request);
$this->cacheHelper->saveCache($cacheKey, $spellingType, [$request->getIndex()]);
}
return $spellingType;
}