I'm using dogpile.cache with a custom file-based backend that creates a file per cached object and uses a lock-file per cache object as the dogpile lock. The cache objects and lock files are on an NFS share (I'm using flufl.lock, so locking on NFS 'should' work) and the processes using/generating the cache objects are running on different machines on the network.
My issue is that, when starting with an empty cache, multiple processes will all generate the cache object once they successfully acquire the lock, rather than a single process generating it and the others subsequently using it.
From what I understand, line 159 in dogpile.py attempts to check for this situation, i.e. the lock has been acquired, but another thread/process may have just generated the value. However this only works for a single process with multiple threads as it only inspects the current dogpile object's state, rather than checking for the existence of the cache object from the backend.
It seems that the check on line 159 should either call the backend's 'get' method or a new backend 'check' method should be introduced. Calling the 'get' method for this simple 'does the cache object exist' check could be inefficient for large cache objects (as in my case), so a 'check' backend method would be nice in this case.