1
0
Fork 0

Added Unittests for cache

fixed Lock & Cache bugs
This commit is contained in:
Philipp Holzer 2018-07-07 19:46:16 +02:00
commit 80a4e6263f
No known key found for this signature in database
GPG key ID: 58160D7D6AF942B6
18 changed files with 317 additions and 25 deletions

View file

@ -1,6 +1,7 @@
<?php
namespace Friendica\Core\Lock;
use Friendica\Core\Cache;
/**
* Lock Driver Interface
@ -23,10 +24,11 @@ interface ILockDriver
*
* @param string $key The Name of the lock
* @param integer $timeout Seconds until we give up
* @param integer $ttl Seconds The lock lifespan, must be one of the Cache constants
*
* @return boolean Was the lock successful?
*/
public function acquireLock($key, $timeout = 120);
public function acquireLock($key, $timeout = 120, $ttl = Cache::FIVE_MINUTES);
/**
* Releases a lock if it was set by us