Cache in laravel

Cache in laravel

Hi, In this tutorial I am going to explain how laravel reacts for cache. Lravael mainlining in build cache system.

You can find laravel cache file in config/cache.php.

If you are using cache for large appalications you can use memcached or apc in driver.

Laravel cache will support in other drivers also like “file”, “database”, “apc”, “memcached”, “redis”, “array”, But default it will store in file.

Lets start how to use the chache.

Store an Item into the cache :

We can use default Carbon expiry time.

Store an item if the cache does not exist.

Check the cache exist or not.

Retrive data from the Cache.

Store an Item into the Cache Permanently

Pulling An Item From The Cache

Removing An Item From The Cache

Thanks!. If you like this article please don’t forget to share and comment.