This enhancement is from discussion on the forum here:
In fact I need to know if a file in the cluster is valid or not.
With eZFSFileHandler, it's not a problem, as the delete process really deletes the file on the disk, and exists() will therefore return false
=> So for this backend, knowing if a cache is valid is easy, just uses the exists() or fileExists() method)
But on the other backends, eZFS2FileHandler, eZDBFileHandler, the deletion seems to consist in not really delete the cache, but instead just changing the mtime
(mtime to a negative value for eZDBFileHandler, and mtime to a specific value in the past for eZFS2FileHandler)
As a result, after deletion, the file still exists, and exists() method returns true, but the cache is not usable
I've been looking for a method to know if the cache is valid, but for now I haven't found, I'm certainly wrong, so please tell me what to use from the API ?
Or if it doesn't exist, why not add a isValid() and isFileValid() methods ?
in kernel/classes/clusterfilehandlers/ezfsfilehandler.php (that ezFS2FileHandler extends), and in kernel/classes/clusterfilehandlers/ezdbfilehandler.php code could be: