tboothman / imdbphp

PHP library for retrieving film and tv information from IMDb
247 stars 84 forks source link

Cache: ERROR: unlink(/cache/imdb_cache/title.tt17235912): No such file or directory #306

Open Fossil01 opened 1 year ago

Fossil01 commented 1 year ago

Been getting a lot of these errors in my logs and I don't really know why or how.

ERROR: unlink(/var/www/removed/storage/framework/cache/imdb_cache/title.tt17235912): No such file or directory at vendor/imdbphp/imdbphp/src/Imdb/Cache.php:137

It tries to delete a file that's not there so I am wondering where this unlink request would come from. Like where would it get the title.tt17235912 filename if it doesn't exist on disk?

tboothman commented 1 year ago

I suppose if you started two requests using imdbphp at the same time they'd have a fight over deleting old files in the cache folder.

I created an issue for limiting cache purge frequency 9 years ago but i/nobody ever did it :D https://github.com/tboothman/imdbphp/issues/6 flock might help, but that sounds like it's a got a lot of footguns