RSSHub/lib/utils/cache
Yufan You 5589b89478
fix(cache): call JSON.stringify when storing value in cache.tryGet (#20671)
* fix(cache): call JSON.stringify when storing value in cache.tryGet

The value is returned as-is, so we may assume that it's not JSON
stringified inside `getValueFunc`. Otherwise, the caller already needs
to distinguish between values that are either JSON parsed or not.

* Revert "fix(routes/mastodon): don't refresh account ID cache (#20663)"

This reverts commit c2cff410fa.

* test: add test

* test: lint
2026-05-07 01:26:11 +08:00
..
base.ts feat(api): add cache probing (#21300) 2026-03-05 02:36:53 +08:00
http.test.ts feat: add HTTP cache (#21814) 2026-04-24 11:35:51 +08:00
http.ts feat: add HTTP cache (#21814) 2026-04-24 11:35:51 +08:00
index.ts fix(cache): call JSON.stringify when storing value in cache.tryGet (#20671) 2026-05-07 01:26:11 +08:00
index.worker.ts feat(worker): implement KV-based caching for Cloudflare Workers (#20806) 2026-01-04 11:29:33 +08:00
kv.ts feat(api): add cache probing (#21300) 2026-03-05 02:36:53 +08:00
memory.ts feat(api): add cache probing (#21300) 2026-03-05 02:36:53 +08:00
redis.test.ts feat(api): add cache probing (#21300) 2026-03-05 02:36:53 +08:00
redis.ts feat(api): add cache probing (#21300) 2026-03-05 02:36:53 +08:00