My ocfilecache table contains 1.5m rows, but I only have 255,069 files in my data dir:
find /mnt/data -type f|wc -l
255069
I have tried using the occ files:cleanup command and it just returns:
0 orphaned file cache entries deleted
Why does occ files:cleanup not remove these entries? From what I can tell, the orphan records in the table belong to users which have been deleted via the web interface. Is occ files:cleanup not deleting the orphaned records because they don’t belong to an existing user?
Most of the people there are having the issue because of external storage. We don’t use any external storage whatsoever, and we also haven’t ever deleted any files except through nextcloud directly, either using the nextcloud sync client, or the web interface.
We have had, however, tons of problems deleting large directories in the past with the web interface shows errors when deleting folders with thousands of files. Its been better in recent versions but my filecache table has records that were deleted years ago.
I think it was just very buggy in earlier versions… Selecting folders with thousands of files and hitting “delete” in the web interface use to come up with “error” after about 5 seconds, way before any php timeouts.
Doesn’t seem to be an issue anymore, maybe its just more stable in later versions or maybe it’s because I’ve been tuning php settings such as memory limits, etc.
If I empty the file cache table, won’t I loose all my share links, of which I have around 400?