Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ghabriel25's avatar

How to test Cache memoization

Hi, I really need any information about how to create performance test only for Cache memoization.

Before

Cache::remember('posts', 60, function () {
    return Post::all();
});

After

Cache::memo()->remember('posts', 60, function () {
    return Post::all();
});

I'm not familiar with the flow behind cache memoization so I have no idea what should be considered when do performance testing.

0 likes
0 replies

Please or to participate in this conversation.