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, background refetching, and optimistic updates.
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 16 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. Background refetching is automatic and non-blocking.
Does SoulCache support offline?
SoulCache supports persistence with storage adapters. For full offline support, use 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