Skip to content
Artwork for No Compromises
No Compromises · August 15 · 11 min

Which layer of caching does your slow app actually need?

When someone says your app is slow and you need caching, do you actually know which layer of caching they are talking about? In the latest episode of the No Compromises podcast, we discuss the many different forms caching takes in a Laravel application and why reaching for the cache facade is not always the answer. We walk through caching from the outside in, starting with edge caching via Cloudflare, moving into Laravel's cache facade for third-party API calls, and all the way down to memoization with the Once helper for expensive in-request calculations. We also make the case that storing data in a database table can be a perfectly valid caching strategy, and that the right question to ask is not whether to cache but what kind of caching actually fits the problem. (00:17) - Why caching means different things to different people (02:04) - Edge caching with Cloudflare explained (05:33) - When a database table beats the cache facade (07:45) - Memoization with the Laravel Once helper (09:19) - Silly bit We have seen every caching mistake in the book. Our code review will find yours. Get practical Laravel tips like these delivered to your inbox every day by subscribing to our newsletter.

0:00 · Why caching means different things to different people-11:33

transcript

No transcript — this publisher did not publish one.

show notes

When someone says your app is slow and you need caching, do you actually know which layer of caching they are talking about?

In the latest episode of the No Compromises podcast, we discuss the many different forms caching takes in a Laravel application and why reaching for the cache facade is not always the answer.

We walk through caching from the outside in, starting with edge caching via Cloudflare, moving into Laravel's cache facade for third-party API calls, and all the way down to memoization with the Once helper for expensive in-request calculations.

We also make the case that storing data in a database table can be a perfectly valid caching strategy, and that the right question to ask is not whether to cache but what kind of caching actually fits the problem.

  • (00:17) - Why caching means different things to different people
  • (02:04) - Edge caching with Cloudflare explained
  • (05:33) - When a database table beats the cache facade
  • (07:45) - Memoization with the Laravel Once helper
  • (09:19) - Silly bit

We have seen every caching mistake in the book. Our code review will find yours.

Get practical Laravel tips like these delivered to your inbox every day by subscribing to our newsletter.

links2

chapters

5 chapters