function _apdqc_lock_may_be_available in Asynchronous Prefetch Database Query Cache 7
Same name in this branch
- 7 apdqc.lock.apc.inc \_apdqc_lock_may_be_available()
- 7 apdqc.lock.db.inc \_apdqc_lock_may_be_available()
- 7 apdqc.lock.memcache_storage.inc \_apdqc_lock_may_be_available()
- 7 apdqc.lock.memcache.inc \_apdqc_lock_may_be_available()
- 7 apdqc.lock.redis.inc \_apdqc_lock_may_be_available()
Check if lock acquired by a different process may be available.
If an existing lock has expired, it is removed.
Parameters
string $name: The name of the lock.
Return value
bool TRUE if there is no lock or it was removed, FALSE otherwise.
1 call to _apdqc_lock_may_be_available()
- apdqc.lock.inc in ./
apdqc.lock.inc - A database-mediated implementation of a locking mechanism.
1 string reference to '_apdqc_lock_may_be_available'
- apdqc.lock.inc in ./
apdqc.lock.inc - A database-mediated implementation of a locking mechanism.
File
- ./
apdqc.lock.memcache_storage.inc, line 87 - A memcached based implementation of a locking mechanism.
Code
function _apdqc_lock_may_be_available($name) {
$lock_exists = MemcacheStorageAPI::get($name, 'semaphore');
return $lock_exists ? FALSE : TRUE;
}