aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/IMemcacheTTL.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-03-29 18:03:03 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2023-12-21 15:14:27 +0100
commit7394645eb7f2f1d2831bb7c106737087992e4da4 (patch)
tree34012ad67f80abc7fee1d730cacbfd6c5cc02334 /lib/public/IMemcacheTTL.php
parent0dcea036a7d8ce7b078d051c1752971ddef0473f (diff)
downloadnextcloud-server-7394645eb7f2f1d2831bb7c106737087992e4da4.tar.gz
nextcloud-server-7394645eb7f2f1d2831bb7c106737087992e4da4.zip
restore shared lock ttl when releasing
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/IMemcacheTTL.php')
-rw-r--r--lib/public/IMemcacheTTL.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/public/IMemcacheTTL.php b/lib/public/IMemcacheTTL.php
index 8424e5b2bfa..250e727308b 100644
--- a/lib/public/IMemcacheTTL.php
+++ b/lib/public/IMemcacheTTL.php
@@ -35,5 +35,22 @@ interface IMemcacheTTL extends IMemcache {
* @param int $ttl time to live in seconds
* @since 8.2.2
*/
- public function setTTL($key, $ttl);
+ public function setTTL(string $key, int $ttl);
+
+ /**
+ * Get the ttl for an existing value, in seconds till expiry
+ *
+ * @return int|false
+ * @since 27
+ */
+ public function getTTL(string $key): int|false;
+ /**
+ * Set the ttl for an existing value if the value matches
+ *
+ * @param string $key
+ * @param mixed $value
+ * @param int $ttl time to live in seconds
+ * @since 27
+ */
+ public function compareSetTTL(string $key, $value, int $ttl): bool;
}