in this old topic I made some efforts to reverse engineer the structure of the oc_filecache database table. With little effort you could create a list of files in the database and their (expected) path in the filesystem. it’s easy then to check which files are missing. this one is talking about the opposite direction - remove all files records not on disk anymore.. might be helpful as well