]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Lock/ILockDriver.php
Merge pull request #6589 from rabuzarus/20190204_-_show_forum_account_in_vcard
[friendica.git] / src / Core / Lock / ILockDriver.php
index af8a1d56aef93dd45061cea5d6ceda7ff5fe20c3..a255f683454753e414e2c20677f106661dccf486 100644 (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 acquire($key, $timeout = 120);
+       public function acquireLock($key, $timeout = 120, $ttl = Cache::FIVE_MINUTES);
 
        /**
         * Releases a lock if it was set by us
@@ -35,7 +37,7 @@ interface ILockDriver
         *
         * @return void
         */
-       public function release($key);
+       public function releaseLock($key);
 
        /**
         * Releases all lock that were set by us