hasLock($smarty, $cached)) { $hadLock = true; if (microtime(true) - $start > $smarty->locking_timeout) { // abort waiting for lock release return false; } sleep(1); } return $hadLock; } /** * Check is cache is locked for this template * * @param Smarty $smarty * @param Cached $cached * * @return bool */ public function hasLock(Smarty $smarty, Cached $cached) { // check if lock exists return false; } /** * Lock cache for this template * * @param Smarty $smarty * @param Cached $cached * * @return bool */ public function acquireLock(Smarty $smarty, Cached $cached) { // create lock return true; } /** * Unlock cache for this template * * @param Smarty $smarty * @param Cached $cached * * @return bool */ public function releaseLock(Smarty $smarty, Cached $cached) { // release lock return true; } }