How Invalidation Works
VectoriaDB validates the cache oninitialize() by checking:
- Cache exists: Does the storage have cached data?
- Tools hash matches: Has the document content changed?
- Version matches: Has the application version changed?
- Model matches: Is the embedding model the same?
Configuration
src/cache-config.ts
Tools Hash
Create a deterministic hash of your documents:src/tools-hash.ts
Version Invalidation
Invalidate cache on deployments:src/version-invalidation.ts
Manual Cache Control
Force Re-index
src/force-reindex.ts
Check Cache Status
src/check-cache.ts
Warm-up Pattern
Common pattern for production deployments:src/warmup.ts
Debugging Cache Issues
src/debug-cache.ts
Error Handling
src/cache-errors.ts
Related
Storage Overview
Storage fundamentals
File Adapter
File storage
Deployment
Production setup