It would be great also to handle differently folders that have been manually set to "always keep offline". My proposal is :
when the quota is reached, nextcloud frees up cache starting by the files that have been accessed for the longest time.
do not free up the files and folders that have been manually set to "always keep offline". Maybe this files must not be counted in the cache quota ? Or are counted, but nextcloud starts to free up "automatic" cache before freeing up space in manually synced folders ?
Allow user to adjust cache size