diff --git a/src/ResourcePool/Extended.php b/src/ResourcePool/Extended.php index ed80acae..fdb67c60 100644 --- a/src/ResourcePool/Extended.php +++ b/src/ResourcePool/Extended.php @@ -106,9 +106,7 @@ protected function warmUp(string $key, string $type) public function save(ResourceInterface $resource): bool { - if (!parent::save($resource)) { - return false; - } + parent::save($resource); $key = $this->generateKey( $resource->getType(), @@ -118,10 +116,8 @@ public function save(ResourceInterface $resource): bool if ($this->autoWarmup && \in_array($resource->getType(), $this->warmupTypes, true)) { $cacheItem = $this->cacheItemPool->getItem($key); - if (!$cacheItem->isHit()) { - $cacheItem->set(guzzle_json_encode($resource)); - $this->cacheItemPool->save($cacheItem); - } + $cacheItem->set(guzzle_json_encode($resource)); + $this->cacheItemPool->save($cacheItem); } return true;