Laravel 13.33: Tagged Memoized Cache &amp; Model Refreshes | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    What's New in Laravel 13.33: Tagged Memoized Cache, Model Refreshes, and More        On this page       1. [  Laravel 13.33 Released: Key Features and Improvements ](#laravel-1333-released-key-features-and-improvements)
2. [  Tagged Memoized Cache ](#tagged-memoized-cache)
3. [  Refresh Model Attributes After Writes ](#refresh-model-attributes-after-writes)
4. [  Store a Real NULL With AsCollection and AsArrayObject ](#store-a-real-null-with-ascollection-and-asarrayobject)
5. [  inplace() and lock() for Index Migrations ](#inplace-and-lock-for-index-migrations)
6. [  Other Notable Changes ](#other-notable-changes)
7. [  Key Takeaways ](#key-takeaways)

  ![What's New in Laravel 13.33: Tagged Memoized Cache, Model Refreshes, and More](https://cdn.msaied.com/695/68465c4a316f52e811ca17f35812522d.png)

 [  Laravel ](https://msaied.com/articles?category=laravel)  #Laravel   #Laravel 13   #Eloquent   #Cache   #Migrations   #Queue  

 What's New in Laravel 13.33: Tagged Memoized Cache, Model Refreshes, and More 
===============================================================================

     22 Sep 2026      3 min read    ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)  Mohamed Said  

       Table of contents

1. [  01   Laravel 13.33 Released: Key Features and Improvements  ](#laravel-1333-released-key-features-and-improvements)
2. [  02   Tagged Memoized Cache  ](#tagged-memoized-cache)
3. [  03   Refresh Model Attributes After Writes  ](#refresh-model-attributes-after-writes)
4. [  04   Store a Real NULL With AsCollection and AsArrayObject  ](#store-a-real-null-with-ascollection-and-asarrayobject)
5. [  05   inplace() and lock() for Index Migrations  ](#inplace-and-lock-for-index-migrations)
6. [  06   Other Notable Changes  ](#other-notable-changes)
7. [  07   Key Takeaways  ](#key-takeaways)

 Laravel 13.33 Released: Key Features and Improvements
-----------------------------------------------------

The Laravel team shipped v13.33.0 on September 23, 2026, with a solid set of developer-focused additions. Here is a breakdown of the most impactful changes.

---

### Tagged Memoized Cache

Contributed by Joost de Bruijn, `Cache::memo()` now supports tagged caches via a `tags()` method. Within a single request, repeated reads for the same key hit the cache backend only once — subsequent reads are served from memory.

```php
// Two calls, one round trip to Redis
Cache::memo()->tags(['permissions'])->get("permissions:{$user->id}");
Cache::memo()->tags(['permissions'])->get("permissions:{$user->id}");

// Writes go to the tagged cache and drop the memoized copy
Cache::memo()->tags(['permissions'])->put("permissions:{$user->id}", $permissions);

// Flushing the tag also clears memoized entries
Cache::memo()->tags(['permissions'])->flush();

```

Before this change, combining tagged caches with memoization required a manual `Cache::store('array')` wrapper. See [\#61593](https://github.com/laravel/framework/pull/61593).

---

### Refresh Model Attributes After Writes

Caleb White contributed a `#[Refreshes]` PHP attribute (and a `$refreshes` property alternative) that reloads specific database columns after a model is created or updated. This is particularly useful for `virtualAs` and `storedAs` generated columns that the database computes at write time.

```php
use Illuminate\Database\Eloquent\Attributes\Refreshes;

#[Refreshes('name')]
class User extends Model
{
    //
}

$user = User::create(['first_name' => 'Taylor', 'last_name' => 'Otwell']);
$user->name; // "Taylor Otwell" — no manual refresh() call needed

```

The refresh issues one targeted query for the listed columns only, on the write connection. See [\#61523](https://github.com/laravel/framework/pull/61523).

---

### Store a Real NULL With AsCollection and AsArrayObject

Zein Ahmad added an opt-in `nullable()` mode to both casts. Without it, assigning `null` stores the JSON string `"null"`, which breaks `whereNull()` queries. With `nullable()`, the column stores a proper database `NULL`.

```php
protected function casts(): array
{
    return [
        'items'   => AsCollection::class,       // stores "null"
        'meta'    => AsCollection::nullable(),   // stores NULL
        'options' => AsArrayObject::nullable(),
    ];
}

```

See [\#61596](https://github.com/laravel/framework/pull/61596).

---

### inplace() and lock() for Index Migrations

Sander Muller added `inplace()` and `lock()` modifiers for index and foreign key operations, letting MySQL migrations request `ALGORITHM=INPLACE` and `LOCK=NONE` to avoid blocking table rebuilds.

```php
Schema::table('video_sessions', function (Blueprint $table) {
    $table->index('foo', 'foo_index')->inplace()->lock('none');
});

```

Supported methods: `index()`, `unique()`, `primary()`, `fullText()`, `spatialIndex()`, and `foreign()`. See [\#61602](https://github.com/laravel/framework/pull/61602).

---

### Other Notable Changes

- **Form Request parent attributes** — `#[StopOnFirstFailure]` and similar attributes on a base `FormRequest` class are now inherited by child requests ([\#61586](https://github.com/laravel/framework/pull/61586)).
- **Worker::$killOnTimeout** — Set to `false` to throw `TimeoutExceededException` instead of killing the worker process on job timeout ([\#61591](https://github.com/laravel/framework/pull/61591)).
- **mockArtisan() / realArtisan()** — New test helpers that cleanly separate expectation-based Artisan mocking from real command execution ([\#61588](https://github.com/laravel/framework/pull/61588)).
- **Valkey protocol support** — `valkey://` and `valkeys://` connection strings are now recognized ([\#61635](https://github.com/laravel/framework/pull/61635)).

---

Key Takeaways
-------------

- `Cache::memo()->tags([...])` eliminates redundant cache backend round trips for tagged keys within a request.
- `#[Refreshes]` keeps generated/computed columns accurate on the in-memory model after every write.
- `AsCollection::nullable()` ensures `whereNull()` works correctly on JSON cast columns.
- `inplace()` on index migrations reduces downtime risk on large MySQL tables.
- `mockArtisan()` and `realArtisan()` make Artisan testing intent explicit without toggling `$mockConsoleOutput`.

---

Source: [Laravel News — Laravel 13.33.0](https://laravel-news.com/laravel-13-33-0)

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fmsaied.com%2Farticles%2Fwhats-new-in-laravel-1333-tagged-memoized-cache-model-refreshes-and-more&text=What%27s+New+in+Laravel+13.33%3A+Tagged+Memoized+Cache%2C+Model+Refreshes%2C+and+More) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmsaied.com%2Farticles%2Fwhats-new-in-laravel-1333-tagged-memoized-cache-model-refreshes-and-more) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  What does Cache::memo()-&gt;tags() do in Laravel 13.33?        It combines the memoized cache store with tagged cache support. Within a single request, the first read fetches data from the cache backend (e.g., Redis) and stores it in memory. All subsequent reads for the same tagged key are served from memory, reducing round trips. Writes and flushes propagate to the tagged cache and also invalidate the in-memory copy. 

      Q02  When should I use the #\[Refreshes\] attribute on an Eloquent model?        Use it when your model has virtualAs or storedAs generated columns, or any column whose value is set by the database at write time. Without #[Refreshes], those columns are missing or stale on the in-memory model until you call refresh() manually. The attribute reloads only the specified columns in a single query after each create or update. 

      Q03  What is the difference between AsCollection::class and AsCollection::nullable() in casts?        The default AsCollection::class cast serializes a null PHP value as the JSON string "null", which means whereNull() queries will not match that row. AsCollection::nullable() stores a real database NULL instead, making the column behave as expected with null-checking queries. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://msaied.com/articles) 

 [ ![Laravel Live Denmark 2026 Talks Are Now on YouTube](https://cdn.msaied.com/694/ef171df318406f98f554df18e58af625.png) Laravel PHP Conference 

### Laravel Live Denmark 2026 Talks Are Now on YouTube

All 17 talks from Laravel Live Denmark 2026 are now on YouTube. The playlist covers PHP generics, Inertia, Nat...

  ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)  Mohamed Said 

 22 Sep 2026     3 min read  

  Read    

 ](https://msaied.com/articles/laravel-live-denmark-2026-talks-are-now-on-youtube) [ ![Live Stream: Building a Social Network in PHP in 48 Hours](https://cdn.msaied.com/692/e20cfd66bbb0473d2084f86b7f5e4dcc.png) PHP Live Stream Nuno Maduro 

### Live Stream: Building a Social Network in PHP in 48 Hours

Nuno Maduro, Brent Roose, and Matthieu Napoli will build a full social network in PHP live from the JetBrains...

  ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)  Mohamed Said 

 22 Sep 2026     2 min read  

  Read    

 ](https://msaied.com/articles/live-stream-building-a-social-network-in-php-in-48-hours) [ ![Livewire v4.4.6 Released: Bug Fixes, Test Improvements, and Alpine v3.17.4](https://cdn.msaied.com/689/454c52282f3ef5d585905e5952ca969c.png) Livewire Laravel Alpine.js 

### Livewire v4.4.6 Released: Bug Fixes, Test Improvements, and Alpine v3.17.4

Livewire v4.4.6 ships with 18 changes including validation performance improvements, better test assertions, k...

  ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)  Mohamed Said 

 21 Sep 2026     3 min read  

  Read    

 ](https://msaied.com/articles/livewire-v446-released-bug-fixes-test-improvements-and-alpine-v3174) 

   [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

Explore

- [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [Contact](https://msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
