Count Cachula – Local-first performance without the complexity
5 days ago
- #web-development
- #caching
- #performance
- Count Cachula offers local-first performance without complexity.
- Features include instant UI updates, cache tags, invalidation, and smart preloading.
- Benefits: Fast (serve cached content instantly), Fresh (automatic cache invalidation), Simple (drop-in replacement for fetch).
- Alternative to local-first architectures, avoiding CRDTs, conflict resolution, and sync protocols.
- Stale-while-revalidate approach: cache as truth, server remains source of truth.
- Instant response with background revalidation, cache tags for group invalidation, smart invalidation via SSE, and preloading.
- Users see data instantly, data stays fresh automatically, server remains source of truth, and it's a drop-in replacement for fetch.
- Works via SSE connection for server-driven invalidation and preloading.
- Server sends preload hints to warm up cache, mutations invalidate tags, and clients update automatically via SSE.
- Progressive enhancement: start simple, add features like SSE, cache tags, and preloading as needed.
- Documentation includes core library, SSE package, and React hooks.