---
title: "Optimizing Queries with Memoization"
url: https://daily.dev/posts/optimizing-queries-with-memoization-rpcg80mxb
source_url: https://laravel-news.com/optimizing-queries-with-memoization-laravel-in-practice-ep9
type: article
source: "Laravel News"
published: 2025-10-28T12:20:48.086Z
updated: 2025-10-28T12:21:14.499Z
tags: ["performance", "php", "laravel"]
reading_time: 1
upvotes: 31
comments: 0
language: 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.

# Optimizing Queries with Memoization

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

## Summary

Duplicate cache calls waste time even when cached. Laravel's Cache::memo() stores results in memory during a single request, eliminating redundant cache reads. Using Laravel Telescope to identify duplicate cache hits, you can implement memoization to reduce three 8ms cache calls down to one, with minimal code changes through a MemoizedCacheService wrapper.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laravel-news.com/optimizing-queries-with-memoization-laravel-in-practice-ep9>

## Similar posts on daily.dev

- [Improving unit test run time in a Laravel modular monolith](https://daily.dev/posts/improving-unit-test-run-time-in-a-laravel-modular-monolith-g9obikl6w) · FREEK.DEV · 3 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/optimizing-queries-with-memoization-rpcg80mxb)
