Skip to content

Commit e015b2f

Browse files
test(integration): add caching lifecycle tests for sourcedFrom, SWR, and invalidation
Adds integrationTests/server/caching.test.ts covering the full cache lifecycle end-to-end via a fake HTTP source server (modelled after the embed-directive test pattern): - sourcedFrom(customSource): cache miss calls source; hit serves from cache - sourcedFrom(source, {replicationSource: true}): single-node populate-on-miss - allowStaleWhileRevalidate(): stale value returned immediately; background refresh updates cache; next request gets fresh value - Composite cache key (deviceType prefix in ID): cross-device isolation - HTTP DELETE invalidation: re-fetch from origin after cache entry deleted Closes #1189 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 88c94e6 commit e015b2f

1 file changed

Lines changed: 441 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)