#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Caching Routes, Config, and Views

Laravel supports caching several parts of an application's bootstrap process, which noticeably reduces overhead on every request in production.

Caching Configuration

php artisan config:cache

This combines all config files into a single cached file, avoiding the cost of loading and merging them on every request. Important: once cached, calls to env() outside config files will no longer work correctly.

Caching Routes

php artisan route:cache

Useful for applications with a large number of routes, since it avoids re-parsing every route definition on each request. Note that routes using closures cannot be cached this way.

Caching Views

php artisan view:cache

Pre-compiles all Blade templates so the first request after deploy doesn't pay the compilation cost.

Clearing All Caches

php artisan optimize:clear

Run this before re-caching after any deploy, so stale cached config or routes don't linger.

These caching commands are one part of a broader set of techniques for keeping a Laravel application fast, which the final topic looks at more widely.

Ready to master Laravel Training Course?

Join Uncodemy's hands-on Laravel program and build real, production-ready applications.

Explore Course