X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=blobdiff_plain;f=includes%2Flibs%2Fobjectcache%2FBagOStuff.php;h=5472e837d4c0c67fffba10e943d7c53fce69260d;hb=2e7f4e48735b0e916336d9166cb1ab1756e0fa9f;hp=25a5a2628e9db3ad090e42ddcb3178c1ba411c05;hpb=52f5f388a40e08a76b6c4efc52fedd1c65cc166d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index 25a5a2628e..5472e837d4 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -372,6 +372,20 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { return $success; } + /** + * Reset the TTL on a key if it exists + * + * @param string $key + * @param int $expiry + * @return bool Success Returns false if there is no key + * @since 1.28 + */ + public function changeTTL( $key, $expiry = 0 ) { + $value = $this->get( $key ); + + return ( $value === false ) ? false : $this->set( $key, $value, $expiry ); + } + /** * Acquire an advisory lock on a key string *