From 394e3f662d2a658cd6fe9baeda1faee9ed45e276 Mon Sep 17 00:00:00 2001 From: Guillaume Loulier Date: Mon, 1 Sep 2025 09:20:28 +0200 Subject: [PATCH] ref(store): CacheStore --- src/store/src/Bridge/Local/CacheStore.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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