@@ -254,6 +254,19 @@ public function set( $key, $value, $timeout = null ) {}
254
254
*/
255
255
public function setex ( $ key , $ ttl , $ value ) {}
256
256
257
+ /**
258
+ * Set the value and expiration in milliseconds of a key.
259
+ *
260
+ * @see setex()
261
+ * @param string $key
262
+ * @param int $ttl, in milliseconds.
263
+ * @param string $value
264
+ * @return bool: TRUE if the command is successful.
265
+ * @link http://redis.io/commands/psetex
266
+ * @example $redis->psetex('key', 1000, 'value'); // sets key → value, with 1sec TTL.
267
+ */
268
+ public function psetex ( $ key , $ ttl , $ value ) {}
269
+
257
270
/**
258
271
* Set the string value in argument as value of the key if the key doesn't already exist in the database.
259
272
*
@@ -298,6 +311,28 @@ public function del( $key1, $key2 = null, $key3 = null ) {}
298
311
*/
299
312
public function delete ( $ key1 , $ key2 = null , $ key3 = null ) {}
300
313
314
+ /**
315
+ * Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.
316
+ *
317
+ * @see del()
318
+ * @param string|array $key1
319
+ * @param string $key2
320
+ * @param string $key3
321
+ * @return int Number of keys unlinked.
322
+ *
323
+ * @link https://redis.io/commands/unlink
324
+ * @example
325
+ * <pre>
326
+ * $redis->set('key1', 'val1');
327
+ * $redis->set('key2', 'val2');
328
+ * $redis->set('key3', 'val3');
329
+ * $redis->set('key4', 'val4');
330
+ * $redis->unlink('key1', 'key2'); // return 2
331
+ * $redis->unlink(array('key3', 'key4')); // return 2
332
+ * </pre>
333
+ */
334
+ public function unlink ( $ key1 , $ key2 = null , $ key3 = null ) {}
335
+
301
336
/**
302
337
* Enter and exit transactional mode.
303
338
*
@@ -367,7 +402,7 @@ public function unwatch( ) {}
367
402
/**
368
403
* Subscribe to channels. Warning: this function will probably change in the future.
369
404
*
370
- * @param array $channels an array of channels to subscribe to
405
+ * @param array $channels an array of channels to subscribe
371
406
* @param string | array $callback either a string or an array($instance, 'method_name').
372
407
* The callback function receives 3 parameters: the redis instance, the channel name, and the message.
373
408
* @return mixed Any non-null return value in the callback will be returned to the caller.
@@ -398,7 +433,7 @@ public function subscribe( $channels, $callback ) {}
398
433
/**
399
434
* Subscribe to channels by pattern
400
435
*
401
- * @param array $patterns The number of elements removed from the set.
436
+ * @param array $patterns an array of glob-style patterns to subscribe
402
437
* @param string|array $callback Either a string or an array with an object and method.
403
438
* The callback will get four arguments ($redis, $pattern, $channel, $message)
404
439
* @param mixed Any non-null return value in the callback will be returned to the caller.
@@ -447,6 +482,22 @@ public function publish( $channel, $message ) {}
447
482
*/
448
483
public function pubsub ( $ keyword , $ argument ) {}
449
484
485
+ /**
486
+ * Stop listening for messages posted to the given channels.
487
+ *
488
+ * @param array $channels an array of channels to usubscribe
489
+ * @link http://redis.io/commands/unsubscribe
490
+ */
491
+ public function unsubscribe ( $ channels = null ) {}
492
+
493
+ /**
494
+ * Stop listening for messages posted to the given channels.
495
+ *
496
+ * @param array $patterns an array of glob-style patterns to unsubscribe
497
+ * @link http://redis.io/commands/punsubscribe
498
+ */
499
+ public function punsubscribe ( $ patterns = null ) {}
500
+
450
501
/**
451
502
* Verify if the specified key exists.
452
503
*
0 commit comments