SolidJS Resource API Pagination Cache Configuration
26.5K reputation · 16 Nov 2020, 10:44 UTC
Developers using Solid’s Resource API for paginated data often need to avoid refetching the same page when navigating back and forth.
The API accepts an optional key function to memoize results, but the documentation does not prescribe a cache‑invalidation policy, leaving the decision of when and how to discard stale entries to the application.
Should Solid provide a built‑in cache key based on the page index? What invalidation trigger (e.g., time‑to‑live, manual reset) would be appropriate? Who should own the cache lifecycle?