readFromCache example

$cacheKey = null;
        if ($request->isMethodCacheable()) {
            /** @var StoreApiCacheKeyHook $cacheKeyHook */
            $cacheKeyHook = $hook->getFunction(StoreApiCacheKeyHook::FUNCTION_NAME);

            $this->executor->execute($cacheKeyHook);

            $cacheKey = $cacheKeyHook->getCacheKey();
        }

        $cachedResponse = $this->readFromCache($cacheKey$context$request);

        if ($cachedResponse) {
            return $cachedResponse;
        }

        /** @var StoreApiResponseHook $responseHook */
        $responseHook = $hook->getFunction(StoreApiResponseHook::FUNCTION_NAME);
        // hook: store-api-{hook}         $this->executor->execute($responseHook);

        $fields = new ResponseFields(
            
Home | Imprint | This part of the site doesn't use cookies.