diff --git a/src/store/src/Bridge/Local/CacheStore.php b/src/store/src/Bridge/Local/CacheStore.php index 65a9aff37..b528f4043 100644 --- a/src/store/src/Bridge/Local/CacheStore.php +++ b/src/store/src/Bridge/Local/CacheStore.php @@ -43,7 +43,11 @@ public function setup(array $options = []): void throw new InvalidArgumentException('No supported options.'); } - $this->cache->clear(); + if ($this->cache->hasItem($this->cacheKey)) { + return; + } + + $this->cache->get($this->cacheKey, static fn (): array => []); } public function add(VectorDocument ...$documents): void