/** * @param string $name * @param string $key * @param \Heyday\CacheInclude\KeyCreators\KeyCreatorInterface $keyCreator * @return void */ protected function addStoredKey($name, $key, KeyCreatorInterface $keyCreator) { $keys = (array) $this->cache->fetch($name); if (!array_key_exists($key, $keys)) { if ($keyCreator instanceof KeyInformationProviderInterface) { $keys[$key] = $keyCreator->getKeyInformation(); } else { $keys[$key] = true; } $this->cache->save($name, $keys); } }