- Is symfony/ai-cache-store a Laravel package?
- No. It is a Symfony AI subpackage and a read-only split of the symfony/ai monorepo. It adapts a PSR-6 or PSR-16 cache backend to Symfony AI's vector Store interface, so in Laravel you use it through Symfony AI rather than Laravel's Cache facade.
- How do I install and wire symfony/ai-cache-store in a Laravel app?
- Install it with composer require symfony/ai symfony/ai-cache-store. Then bind a PSR cache adapter, typically Redis, as a singleton in a service provider and wrap the store in a small facade. The package does not integrate with Laravel's cache configuration directly, so you own that translation layer.
- How does symfony/ai-cache-store perform vector search?
- It stores embeddings as cache values and, on query, enumerates the stored vectors and computes similarity for each item. There is no ANN index, dynamic indexing, or hybrid search. That brute-force approach is simple but makes query cost proportional to the number of vectors.
- Which cache backend should I use with symfony/ai-cache-store in Laravel?
- Redis is the realistic production target because it can be reached through a PSR cache adapter and can be configured with persistence. File and APCu caches are volatile, and Redis without persistence is still volatile, so vector loss becomes a search-quality problem. Validate the eviction and TTL policies before relying on it.
- Does symfony/ai-cache-store support metadata filtering?
- Yes. Metadata filtering was added in v0.4.0, alongside insert, query, and remove. That is effectively the full store surface area, so confirm your filter patterns in a spike before designing around them.
- What happens at 100K vectors with the cache vector store?
- Expect the store to walk stored vectors and compute similarity per item, with Redis key enumeration potentially using SCAN or KEYS. KEYS is O(n) and can block Redis, so benchmark against a real dataset rather than a synthetic one. For many Laravel workloads, 100K vectors is likely beyond acceptable latency for customer-facing traffic.
- Is symfony/ai-cache-store production-ready?
- Treat it as early-stage. The latest tag is v0.8.0, breaking changes are permitted pre-1.0, and the repository has thin community signal. It fits internal docs search, catalog similarity, staging, and LLM response caching at small scale; it is a poor fit for high QPS or workloads where vector loss is a correctness issue.
- How should I test symfony/ai-cache-store in a Laravel application?
- Bind an in-memory PSR cache adapter for tests, seed known vectors, and assert insert, query, remove, and metadata-filter behavior through your facade. Keep fixtures small because queries scan every stored vector. Also test missing or evicted cache entries so you know how search degrades.
- Can I switch from symfony/ai-cache-store to pgvector, Milvus, or Weaviate later?
- Yes, but only if your access layer is abstracted. Keep your application code depending on a store interface or your own facade rather than the cache adapter directly. Then the exit path becomes a configuration and binding change instead of a rewrite.
- Who maintains symfony/ai-cache-store and what is its support posture?
- It is maintained in the Symfony AI monorepo under MIT, and this repository is a read-only split with automated tags. Releases such as v0.8.0 may show no significant changes, so do not expect curated Laravel-specific changelogs or third-party write-ups. Plan to investigate issues internally or patch the upstream monorepo.