Vigyata.AI
Is this your channel?

Episode 3 - Making Our App Faster – Redis to the Rescue

466 views· 22 likes· 17:09· May 21, 2025

🛍️ Products Mentioned (7)

⚡️ In this episode of the "Not Just Another Todo App" series, we hit a familiar developer moment: As our Laravel Todo App starts growing with more tasks and users, the dashboard begins to slow down. But instead of upgrading servers or tweaking the database endlessly, we do something smarter — we bring in Redis. In this video, I’ll show you: How to configure Redis in your Laravel app (on Cloudways) What to cache and why (dashboard stats, task summaries, etc.) How to implement basic caching using Cache::remember() When to bust the cache to keep things accurate Real before vs. after performance results! Redis is incredibly powerful — and Laravel makes it dead simple to integrate. If you’ve never used caching before, or if you’ve only scratched the surface, this is where you level up your performance game. 💡 Powered by Cloudways – Managed Web Hosting for the Ultimate Online Presence === OFFER === GET 15% DISCOUNT ON ALL PLANS OF CLOUDWAYS HOSTING FOR 3 MONTHS https://unified.cloudways.com/signup?id=1029148&coupon=LARATIPS&data1=LARA4&utm_content=LARA4&utm_source=YouTube === Important Links === Fonts, extensions I use, and Support Laratips links: https://bit.ly/m/laratips === Video Related Links === 👉 Project GitHub Link https://github.com/AshishDhamalaAD/todoapp 👉 Watch the full playlist: Not Just Another Todo App https://www.youtube.com/playlist?list=PL2DahmvUpeutVEyDcVzAMVH7NLSNy6lrS 👉 Chart Js https://www.chartjs.org/ 👉 Debugbar for Laravel https://github.com/barryvdh/laravel-debugbar 👉 Laravel Documentation for Caching https://laravel.com/docs/12.x/cache#main-content 👉 Laravel Documentation for Observer https://laravel.com/docs/12.x/eloquent#observers #laravel #php #laraveltip #laratips

About This Video

Hey, what’s up guys—this is Episode 3 of my “Not Just Another Todo App” series, and the whole focus is speed. As our Laravel Todo App grows (I seeded 1,000 todos to make it real), the dashboard starts slowing down because we’re doing heavier queries to build charts. In this video I build two Chart.js bar charts: daily todos for the current month (grouped by day) and weekly todos for that same month (grouped by week number). I also show how I prepare the labels and datasets on the server so the frontend stays clean. Then I measure everything properly using Laravel Debugbar—so we’re not guessing. You’ll literally see the page load time and the query timings change as we refresh. After that, Redis comes in to rescue the dashboard: I switch the cache store to Redis and wrap the heavy parts inside Cache::remember() with separate keys for daily and weekly stats. On the first load, the queries run; after that, the queries are gone and the load on the CPU drops. Finally, I make the cache correct by busting it when data changes. I create a TodoObserver and forget the cache keys on create, update, and delete—so the next dashboard visit regenerates fresh cached stats. I also deploy it to Cloudways, where Redis is already available, and show the same caching behavior in production.

Frequently Asked Questions

🎬 More from Laratips