How to Cache Database Queries with Redis in Laravel – Redis Series Episode 4



In this short episode, I show you how you can cache database queries for a certain period of time. This is really nice when you have data you know won’t change during x period of time, because once it’s in cache, Laravel knows to automatically skip the database query and immediately deliver the requested content from RAM. Super fast, super easy.

Here’s the complete project throughout all episodes: https://gitlab.com/Christf24/RedisCast/tree/master/

Next episode will go over tagging with Redis (for blog posts, movie genres, or whatever else).

Previous episode (Counting page views, and creating a “Top Viewed Article” list on home page): https://www.youtube.com/watch?v=ZMjw5WFPG8c

Next episode (Tagging articles, products, movies, etc..): http://youtu.be/L2keoHFThwY

source

Reply


Build A Site Info