Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clearAllObjectsFromCache rmdir directory not empty #149

Open
pravo-pro opened this issue Jul 18, 2021 · 0 comments
Open

clearAllObjectsFromCache rmdir directory not empty #149

pravo-pro opened this issue Jul 18, 2021 · 0 comments

Comments

@pravo-pro
Copy link

Good day! I use a file cache, because RAM on such volumes will be an expensive solution.
Sometime when i change some parameters, i need to clear the entire cache
in log i found the errror

rmdir directory not empty 
#1 /vendor/league/flysystem/src/Adapter/Local.php(420): rmdir('/var/www/sitedir-...')
#2 /vendor/league/flysystem/src/Filesystem.php(251): League\\Flysystem\\Adapter\\Local->deleteDir('cache')
#3 /vendor/cache/filesystem-adapter/FilesystemCachePool.php(94): League\\Flysystem\\Filesystem->deleteDir('cache')
#4 /vendor/cache/adapter-common/AbstractCachePool.php(176): Cache\\Adapter\\Filesystem\\FilesystemCachePool->clearAllObjectsFromCache()

After analyzing the sources, I saw that you take the specified folder, delete all folders/files/links from it recursively, and then delete the folder itself. But during deletion, a NEW cache is created. which will not be deleted by the function earlier, and it will not be possible to delete the parent folder accordingly. Why the cache folder is recreated every time, is it possible to disable it somehow, deleting only the contents found at the time of starting the cache cleanup? or temporary disable cache while deleting(not best choise)

P.S. using laravel 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant