FAQ
Frequently asked questions about SoulCache
Frequently Asked Questions
General
What is SoulCache?
SoulCache is a universal data fetching and caching runtime for modern applications. It provides automatic caching, request deduplication, cache invalidation, mutations, and optimistic updates. Background refetching and retry are internal modules targeted for future milestones.
Is SoulCache production-ready?
Yes. SoulCache is designed for production use with zero runtime dependencies, full TypeScript support, and comprehensive testing.
Does SoulCache have runtime dependencies?
No. SoulCache has zero runtime dependencies. All functionality is built from scratch.
Installation
What Node.js version is required?
SoulCache requires Node.js 20 or higher.
Does SoulCache work with React?
Yes. SoulCache provides a React adapter with hooks and components.
Usage
How do I cache data?
SoulCache automatically caches data. Just use fetchQuery:
How do I invalidate cache?
How do I update cache optimistically?
Performance
How fast is SoulCache?
SoulCache operations are O(1) for cache hits and O(1) for cache writes.
Does SoulCache support offline?
SoulCache supports persistence with the bundled MemoryAdapter and pluggable storage adapters. For full offline support, integrate a browser adapter such as IndexedDB or AsyncStorage.
Troubleshooting
My queries aren't updating
- Check query keys are stable
- Ensure subscriptions are active
- Verify cache invalidation
Memory leaks
- Always unsubscribe from queries
- Use garbage collection
- Monitor observer count