diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php index cc528c4..47fc243 100644 --- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php +++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\Core\KeyValueStore\DatabaseStorageExpire. + * Contains Drupal\Core\KeyValueStore\DatabaseStorageExpirable. */ namespace Drupal\Core\KeyValueStore; diff --git a/core/lib/Drupal/Core/KeyValueStore/KeyValueStoreExpirableInterface.php b/core/lib/Drupal/Core/KeyValueStore/KeyValueStoreExpirableInterface.php index 442619f..113c6c6 100644 --- a/core/lib/Drupal/Core/KeyValueStore/KeyValueStoreExpirableInterface.php +++ b/core/lib/Drupal/Core/KeyValueStore/KeyValueStoreExpirableInterface.php @@ -13,17 +13,39 @@ interface KeyValueStoreExpirableInterface extends KeyValueStoreInterface { /** + * Saves a value for a given key with a time to live. * + * @param string $key + * The key of the data to store. + * @param mixed $value + * The data to store. + * @param int $expire + * The time to live for items, in seconds. */ function setWithExpire($key, $value, $expire); /** + * Sets a value for a given key with a time to live, if it does not exist yet. * + * @param string $key + * The key of the data to store. + * @param mixed $value + * The data to store. + * @param int $expire + * The time to live for items, in seconds. + * + * @return bool + * TRUE if the data was set, FALSE if it already existed. */ function setWithExpireIfNotExists($key, $value, $expire); /** + * Saves an array of values with a time to live. * + * @param array $data + * An array of data to store. + * @param int $expire + * The time to live for items, in seconds. */ function setMultipleWithExpire(array $data, $expire); diff --git a/core/modules/user/lib/Drupal/user/KeyValueStoreWithOwnerFactory.php b/core/modules/user/lib/Drupal/user/KeyValueStoreWithOwnerFactory.php index 2a0c20c..dc389ba 100644 --- a/core/modules/user/lib/Drupal/user/KeyValueStoreWithOwnerFactory.php +++ b/core/modules/user/lib/Drupal/user/KeyValueStoreWithOwnerFactory.php @@ -1,7 +1,8 @@