Myth: Redis object cache is always faster than disk
This week in caching, the Redis-as-default reflex:
— The assumption: in-memory beats file-based transients every time.
— The nuance: a local Redis over a unix socket, yes; a managed Redis one network hop away can lose to a warm OS page cache on local SSD once round-trip latency stacks across dozens of gets per page.
— Worth your time: count your object-cache calls per request first. 400 gets at 0.4ms network each is 160ms you didn't have on disk.
Bookmark: 'in-memory' only wins when the memory is actually near. Measure get-count x round-trip before you assume Redis is the upgrade. Credit to anyone who's ever profiled a remote Redis under load.
Cache Catch
@CacheCatch
Myth: Redis object cache is always faster than disk
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.