]> git.mxchange.org Git - friendica.git/commitdiff
Removed some leftovers
authorPhilipp Holzer <admin+github@philipp.info>
Sun, 4 Aug 2019 13:58:53 +0000 (15:58 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Sun, 4 Aug 2019 13:58:53 +0000 (15:58 +0200)
src/Console/Cache.php
src/Core/Cache/IMemoryCache.php
src/Core/Lock.php
src/Core/Lock/ILock.php

index e2a3830980be589edb8ec7121747104b2151a6c6..a13e003aab5fc43c7a136d179844a0a062f70e65 100644 (file)
@@ -4,6 +4,7 @@ namespace Friendica\Console;
 
 use Asika\SimpleConsole\CommandArgsException;
 use Friendica\App;
+use Friendica\Core\Cache\Cache as CacheClass;
 use Friendica\Core\Cache\ICache;
 use RuntimeException;
 
@@ -153,7 +154,7 @@ HELP;
                if (count($this->args) >= 3) {
                        $key      = $this->getArgument(1);
                        $value    = $this->getArgument(2);
-                       $duration = intval($this->getArgument(3, ICache::FIVE_MINUTES));
+                       $duration = intval($this->getArgument(3, CacheClass::FIVE_MINUTES));
 
                        if (is_array($this->cache->get($key))) {
                                throw new RuntimeException("$key is an array and can't be set using this command.");
index 939e545741cf78da71e36a73880515df6baec0e7..339f72d04a37161d1e47ae34b3a9324495ffffb8 100644 (file)
@@ -19,7 +19,7 @@ interface IMemoryCache extends ICache
         * @param int    $ttl      The cache lifespan, must be one of the Cache constants
         * @return bool
         */
-       public function add($key, $value, $ttl = ICache::FIVE_MINUTES);
+       public function add($key, $value, $ttl = Cache::FIVE_MINUTES);
 
        /**
         * Compares if the old value is set and sets the new value
@@ -31,7 +31,7 @@ interface IMemoryCache extends ICache
         *
         * @return bool
         */
-       public function compareSet($key, $oldValue, $newValue, $ttl = ICache::FIVE_MINUTES);
+       public function compareSet($key, $oldValue, $newValue, $ttl = Cache::FIVE_MINUTES);
 
        /**
         * Compares if the old value is set and removes it
index 06313fdd2d8ea365b5b7390bdd2a8c759a8a9221..ef62bc8f76e20770a9f7287226424ae7a8379063 100644 (file)
@@ -8,7 +8,7 @@
 namespace Friendica\Core;
 
 use Friendica\BaseObject;
-use Friendica\Core\Cache\ICache;
+use Friendica\Core\Cache\Cache;
 use Friendica\Core\Lock\ILock;
 
 /**
@@ -26,7 +26,7 @@ class Lock extends BaseObject
         * @return boolean Was the lock successful?
         * @throws \Exception
         */
-       public static function acquire($key, $timeout = 120, $ttl = ICache::FIVE_MINUTES)
+       public static function acquire($key, $timeout = 120, $ttl = Cache::FIVE_MINUTES)
        {
                return self::getClass(ILock::class)->acquireLock($key, $timeout, $ttl);
        }
index 3c56369eb9bacde00143653fca122f85c393040a..0b91daeb568d9bc808d3d907cef4a29e504e81af 100644 (file)
@@ -30,7 +30,7 @@ interface ILock
         *
         * @return boolean Was the lock successful?
         */
-       public function acquireLock($key, $timeout = 120, $ttl = Cache\ICache::FIVE_MINUTES);
+       public function acquireLock($key, $timeout = 120, $ttl = Cache\Cache::FIVE_MINUTES);
 
        /**
         * Releases a lock if it was set by us