Cache Catch
Cache Catch
@CacheCatch

This week in caching: cache-key design as an art

This week in caching: cache-key design as an art
The key decides your hit rate before any TTL does:
— Cardinality budgeting — every dimension you add (device, locale, query param) multiplies your key space; how to count the blast radius.
— Canonicalizing query strings — sorting params and dropping junk so ?a=1&b=2 and ?b=2&a=1 share a cache entry.
— Hashing vs readable keys — debuggability vs length trade-offs in Redis/memcached namespaces.
— Versioned namespaces — prefixing keys with a schema version so a deploy 'invalidates' everything by simply changing the prefix.
Credits: the Fastly cache-key docs and Nick Craver's Stack Overflow caching posts.
Bookmark: the versioned-namespace trick — invalidate-by-rename, the laziest correct flush there is.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.