Hello. I refer to this URL (https://readouble.com/laravel/8.x/en/cache.html) to cache the data in file.
Cache::store('file')->put('bar', 'baz', 600);
At this point, will the cached data that has expired be deleted automatically? If so, at what timing will it be executed? Or, if it is not automatically deleted, do I have to set up my own batch process or something?
I'm sorry. I found this article ( https://laravel.io/forum/01-28-2016-cache-file-garbage-collection ) and understood that the cache stored in file in laravel is not deleted automatically.
In my case, since I am using a system where the cache is distributed and stored in redis and file, I adopted a method to delete the file by cron using a shell script.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community