<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/memoize-tagged-cache-reads-in-laravel-td8tqfgfr" -->

---
title: Memoize Tagged Cache Reads in Laravel | daily.dev
description: Laravel 13.33 extends the memoized cache, Cache::memo(), to support cache tags via Cache::memo()->tags(). This lets a tagged cache key be read once per request...
canonical: https://daily.dev/posts/memoize-tagged-cache-reads-in-laravel-td8tqfgfr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Memoize Tagged Cache Reads in Laravel | daily.dev
og:description: Laravel 13.33 extends the memoized cache, Cache::memo(), to support cache tags via Cache::memo()->tags(). This lets a tagged cache key be read once per request...
og:url: https://daily.dev/posts/memoize-tagged-cache-reads-in-laravel-td8tqfgfr
og:image: https://api.daily.dev/og/posts/tD8TQFGFR.png
og:image:alt: Memoize Tagged Cache Reads in Laravel
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Memoize Tagged Cache Reads in Laravel

**[Laravel News](https://daily.dev/sources/ln)** · 3 min read · 1 upvotes · 0 comments

## Summary

Laravel 13.33 extends the memoized cache, Cache::memo(), to support cache tags via Cache::memo()->tags(). This lets a tagged cache key be read once per request from the store and served from memory on subsequent lookups, which helps with repeated tagged reads like permission checks in can() calls and @can directives. Writes and flushes (put, putMany, add, increment, decrement, forever, touch, forget, flush) invalidate the memoized copy so later reads go back to the store. The feature is best suited for values that stay constant during a request, such as permissions or settings, and not for counters or values another process may update mid-request. Memoized values reset at the start of each request or job.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laravel-news.com/laravel-tagged-memoized-cache>

## Questions this post answers

### How do I memoize tagged cache reads in Laravel 13.33?

Call tags() on the memoized cache facade, then use it like a normal tagged cache: Cache::memo()->tags(['permissions', "user:{$user->id}"])->remember($key, $ttl, $callback). The first read in a request hits the cache store or runs the closure on a miss; subsequent calls with the same tags and key return the value from memory for the rest of the request or job.

_daily.dev surfaces framework release notes like this for developers tuning Laravel cache performance._

### Does writing to a memoized tagged cache in Laravel invalidate the memoized value?

Yes, methods that change a value such as put(), putMany(), add(), increment(), decrement(), forever(), touch(), and forget() write to the tagged store and drop the memoized copy of that key, so the next get() call reads from the store again. Calling flush() on a memoized tagged cache flushes the tags in the store and clears all memoized tagged values.

_Developers debugging stale cache reads can track these Laravel caching mechanics on daily.dev._

### When should I avoid Laravel's memoized cache for tagged values?

Avoid it for values that another process, request, or queue worker might update mid-request, such as counters, since the memoized copy in the current request will not reflect that change. It works best for values that stay constant during a request, like permissions or settings, and memoized values reset automatically at the start of each new request or job.

_For Laravel performance trade-offs like this, developers keep up via daily.dev before shipping caching changes._

## Similar posts on daily.dev

- [Cache::memo\(\) Just Got Tags](https://daily.dev/posts/cache-memo-just-got-tags-ewm1xmrfi) · Medium · 0 upvotes · 0 comments
- [Tagged Memoized Cache and Model Refreshes in Laravel 13.33](https://daily.dev/posts/tagged-memoized-cache-and-model-refreshes-in-laravel-13-33-q4woi8bpl) · Laravel News · 9 upvotes · 2 comments
- [Storage Cache Store in Laravel 13.10.0](https://daily.dev/posts/storage-cache-store-in-laravel-13-10-0-r1lc1xf37) · Laravel News · 35 upvotes · 4 comments
- [Stop Serving Stale Data: Automatic Eloquent Query Caching on Any Cache Store](https://daily.dev/posts/stop-serving-stale-data-automatic-eloquent-query-caching-on-any-cache-store-ol6zhzzq5) · Medium · 0 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel)

[View this post on daily.dev](https://daily.dev/posts/memoize-tagged-cache-reads-in-laravel-td8tqfgfr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Memoize Tagged Cache Reads in Laravel","url":"https://daily.dev/posts/memoize-tagged-cache-reads-in-laravel-td8tqfgfr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/memoize-tagged-cache-reads-in-laravel-td8tqfgfr"},"datePublished":"2026-09-25T14:25:53.234Z","dateModified":"2026-09-25T14:26:14.819Z","description":"Laravel 13.33 extends the memoized cache, Cache::memo(), to support cache tags via Cache::memo()-\u003etags(). This lets a tagged cache key be read once per request...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ac03b03a328d2bec8634b43ffcb871b4?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ac03b03a328d2bec8634b43ffcb871b4?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Laravel News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Laravel News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ln","url":"https://daily.dev/sources/ln"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/memoize-tagged-cache-reads-in-laravel-td8tqfgfr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,laravel","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Laravel News","item":"https://daily.dev/sources/ln"},{"@type":"ListItem","position":3,"name":"Memoize Tagged Cache Reads in Laravel"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/memoize-tagged-cache-reads-in-laravel-td8tqfgfr#faq","mainEntity":[{"@type":"Question","name":"How do I memoize tagged cache reads in Laravel 13.33?","acceptedAnswer":{"@type":"Answer","text":"Call tags() on the memoized cache facade, then use it like a normal tagged cache: Cache::memo()-\u003etags(['permissions', \"user:{$user-\u003eid}\"])-\u003eremember($key, $ttl, $callback). The first read in a request hits the cache store or runs the closure on a miss; subsequent calls with the same tags and key return the value from memory for the rest of the request or job. daily.dev surfaces framework release notes like this for developers tuning Laravel cache performance."}},{"@type":"Question","name":"Does writing to a memoized tagged cache in Laravel invalidate the memoized value?","acceptedAnswer":{"@type":"Answer","text":"Yes, methods that change a value such as put(), putMany(), add(), increment(), decrement(), forever(), touch(), and forget() write to the tagged store and drop the memoized copy of that key, so the next get() call reads from the store again. Calling flush() on a memoized tagged cache flushes the tags in the store and clears all memoized tagged values. Developers debugging stale cache reads can track these Laravel caching mechanics on daily.dev."}},{"@type":"Question","name":"When should I avoid Laravel's memoized cache for tagged values?","acceptedAnswer":{"@type":"Answer","text":"Avoid it for values that another process, request, or queue worker might update mid-request, such as counters, since the memoized copy in the current request will not reflect that change. It works best for values that stay constant during a request, like permissions or settings, and memoized values reset automatically at the start of each new request or job. For Laravel performance trade-offs like this, developers keep up via daily.dev before shipping caching changes."}}]}
```

