4 "github.com/Kovensky/go-fscache/lock"
7 // Locks the file that backs the given key.
9 // If the call is successful, it's the caller's responsibility to call Unlock on the returned lock.
10 func (cd *CacheDir) Lock(key ...CacheKey) (lock.FileLock, error) {
11 l, err := lock.LockFile(cd.cachePath(key...))