Skip to content

Commit 394e3f6

Browse files
committed
ref(store): CacheStore
1 parent 4f83f33 commit 394e3f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/store/src/Bridge/Local/CacheStore.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ public function setup(array $options = []): void
4343
throw new InvalidArgumentException('No supported options.');
4444
}
4545

46-
$this->cache->clear();
46+
if ($this->cache->hasItem($this->cacheKey)) {
47+
return;
48+
}
49+
50+
$this->cache->get($this->cacheKey, static fn (): array => []);
4751
}
4852

4953
public function add(VectorDocument ...$documents): void

0 commit comments

Comments
 (0)