igorkamyshev / farfetched

The advanced data fetching tool for web applications
https://ff.effector.dev
MIT License
191 stars 33 forks source link

Cache key serialization doesn't process js Date #499

Open SQReder opened 3 months ago

SQReder commented 3 months ago

Cache key serialization transform js Date objects as {} Applicable for both humanReadableKeys flag states

cache(cachedQuery, {
  adapter: inMemoryCache({ observability: { hit, miss } }),
  staleAfter: "1m",
  humanReadableKeys: true,
});

cachedQuery.start(new Date(100))
cachedQuery.start(new Date(200)) // return cached result of query above

image