Indeed this could be related to cache, because Files Gallery uses folder "modified time" to validate cache, but this does not get updated when simply changing permissions.
There are three ways to manually invalidate cache for folders:
- Manually modify folder "modified time", by either
touch path/folder
or for example renaming it back and forth.
- Change the cache_key config option, for example from 0 to 1.
- Manually delete all
_files/cache/folders/*
and also clear localStorage cache in browser.
I'm thinking, I could perhaps create cache files that take permissions into account. However, changing permissions on a folder does not technically make the cache invalid, so I'm not sure it's worth validating cache vs permissions just to display an updated permissions mask.