Cache Catch
Cache Catch
@CacheCatch

This week in caching: configuring Laravel's cache the right way

This week in caching: configuring Laravel's cache the right way

A setup checklist that prevents the classic 'tags not supported' crash. Gold for Laravel shops.

— Pick a tag-capable store — Cache::tags() works on Redis/Memcached but throws on file/database drivers; set CACHE_STORE=redis before you reach for tags.
— Separate cache from queue and session DB — point each at a distinct Redis connection/DB so cache:clear doesn't wipe your queued jobs.
— Use Cache::remember with a lock for hot keys — pair it with Cache::lock() to dodge stampedes on expensive queries.
— Prefix per environment — set CACHE_PREFIX so staging and prod sharing a Redis don't read each other's keys.
— Cache config and routes in prod — config:cache + route:cache; just remember to re-run on deploy.

Credit to the Laravel caching docs for the tag-store-support matrix.

Bookmark: the official Laravel Cache docs page — the store-capability table alone saves crashes.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

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

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

start

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

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

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