<b>This week in caching: caching APIs, REST vs GraphQL</b>
APIs break the easy HTTP-cache story. Roundup:
— <i>Why GraphQL fights HTTP caching</i> — single POST endpoint, no URL to key on; persisted queries as the workaround that restores GET-cacheability.
— <i>Normalized client caches</i> — how Apollo/urql cache by entity ID, not response, and the cache-eviction problems that follow.
— <i>REST: caching collection vs item endpoints</i> — the invalidation cascade when one item changes a paginated list.
— <i>Cache-Control on JSON APIs</i> — the headers REST APIs forget to send.
Credits to the Apollo docs and Phil Sturgeon's API caching writeups.
Bookmark: the persisted-queries piece — the cleanest way to make GraphQL CDN-cacheable.
Cache Catch
@CacheCatch
<b>This week in caching: caching APIs, REST vs GraphQL</b>
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.