]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Cache/TraitCompareDelete.php
Merge pull request #1 from friendica/develop
[friendica.git] / src / Core / Cache / TraitCompareDelete.php
index 898e39aecc7d7cd9731d203082d9f2ebb5c1358b..508a2c866ffd248855f343feab8796daab13d199 100644 (file)
@@ -1,28 +1,43 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Core\Cache;
 
-use Friendica\Core\Cache;
-
 /**
  * Trait TraitCompareSetDelete
  *
- * @brief This Trait is to compensate non native "exclusive" sets/deletes in caches
- *
- * @package Friendica\Core\Cache
+ * This Trait is to compensate non native "exclusive" sets/deletes in caches
  */
 trait TraitCompareDelete
 {
        abstract public function get($key);
 
-       abstract public function set($key, $value, $ttl = Cache::FIVE_MINUTES);
+       abstract public function set($key, $value, $ttl = Duration::FIVE_MINUTES);
 
        abstract public function delete($key);
 
-       abstract public function add($key, $value, $ttl = Cache::FIVE_MINUTES);
+       abstract public function add($key, $value, $ttl = Duration::FIVE_MINUTES);
 
        /**
-        * @brief NonNative - Compares if the old value is set and removes it
+        * NonNative - Compares if the old value is set and removes it
         *
         * @param string $key          The cache key
         * @param mixed  $value        The old value we know and want to delete
@@ -42,4 +57,4 @@ trait TraitCompareDelete
                        return false;
                }
        }
-}
\ No newline at end of file
+}