/** * @param AbstractService $service * * @return CacheableInterface|null */ protected function createCache(AbstractService $service) { if (!$service instanceof ServiceCacheableInterface) { return null; } return new CacheableData($service->getHashKey(), $service->getTtl(), $service); }