Delete right after reading Laravel Cache

How to clear Laravel cache right after reading

Panjeh
Feb 2, 2021

In Laravel, if you need to read/retrieve a cache item and delete that item right after reading from Cache, you may use the pull method.

$value = Cache::pull('key');

note: null will be returned if the item does not exist in the cache.

I would like to introduce two packages for Laravel that I have recently developed: Laravel Pay Pocket, a modern multi-wallet package, and Laravel Failed Jobs, a UI for the Laravel Failed Jobs Table. I hope they may be of help to you.

https://github.com/HPWebdeveloper/laravel-pay-pocket
https://github.com/HPWebdeveloper/laravel-failed-jobs

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Panjeh
Panjeh

Written by Panjeh

Posting about Python and Laravel

No responses yet

Write a response