@"pooh"#p1053but still files.gallery's image caching method is lightning fast. I do wonder how that's possible but I don't worry about the folder size anymore.
Files gallery does not read the full contents of the cache dir. It only needs to check if the requested image is there, and serve it as cache if it is. The amount of files in the cache dir has no effect on the performance of Files Gallery.
pooh However, my images cache now holds 323,351 files
Even if we created sub-directories, there would still be 323,351 files, but then also loads of folders (also nodes on server). There is no way around cache of course, unless you disable preview images or disable cache (but then, serving resized images will be slow). You could also have a script that cleans the cache dir, for example on a weekly basis, although there is not really much benefit to this.
pooh not a directory I'd want to do an ls -ls in
Probably not. But there is no logical reason you would do this anyway ... What would you be looking for? Also, you could try commands like ls -U | head -4
(see stackoverflow post), which limits the output -4
, and does not sort -U
... Or even just ls -U
, which should be much faster without sorting.
https://stackoverflow.com/questions/40193/quick-ls-command
You can of course delete all the content of the cache dir without actually "entering" with rm _files/cache/image/*
.
pooh When I started using files.gallery I worried about the folder size and also thought it would be better to have a folder structure for the images cache.
If the folder structure approach had a logical benefit for the cache, I would have considered it. But what you are basically asking, is "distribute cache into multiple folders, to avoid having 'too many' files in a single folder" ... Thanks for opening up for debate!