diff options
author | Paul Dragoonis <dragoonis@gmail.com> | 2016-11-18 21:40:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-18 21:40:09 +0000 |
commit | 59bc7f0c7380b7e10c4c5b7e63b4b7832f9c770d (patch) | |
tree | 065e6212701ea32e23989254bb3e59986d9606cf | |
parent | 33254570d4d265db711fdec1d5c05a64ab3cd3fb (diff) | |
parent | 8ac9347c7524efb98beabd6db9a1b0c7fed76fa7 (diff) | |
download | fig-standards-59bc7f0c7380b7e10c4c5b7e63b4b7832f9c770d.zip fig-standards-59bc7f0c7380b7e10c4c5b7e63b4b7832f9c770d.tar.gz fig-standards-59bc7f0c7380b7e10c4c5b7e63b4b7832f9c770d.tar.bz2 |
Merge pull request #842 from SpacePossum/patch-4
Update simplecache.md
-rw-r--r-- | proposed/simplecache.md | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/proposed/simplecache.md b/proposed/simplecache.md index 00ffa7b..3cb8536 100644 --- a/proposed/simplecache.md +++ b/proposed/simplecache.md @@ -127,7 +127,7 @@ interface CacheInterface * Persist data in the cache, uniquely referenced by a key with an optional expiration TTL time. * * @param string $key The key of the item to store - * @param mixed $value The value of the item to store + * @param mixed $value The value of the item to store, must be serializable * @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and * the driver supports TTL then the library may set a default value * for it or let the driver take care of that. @@ -212,24 +212,26 @@ interface CounterInterface /** * Increment a value atomically in the cache by the given step value and return the new value * - * If the key does not exist, it is initialized to the value of $step + * If the key does not exist, it is initialized to the value of $step. + * If the value is increased above PHP_INT_MAX the return value is undefined. * * @param string $key The cache item key * @param int $step The value to increment by, defaulting to 1 * - * @return int|bool The new value on success and false on failure + * @return int|false The new value on success and false on failure */ public function increment($key, $step = 1); /** * Decrement a value atomically in the cache by the given step value and return the new value * - * If the key does not exist, it is initialized to the value of -$step + * If the key does not exist, it is initialized to the value of -$step. + * If the value is decreased below PHP_INT_MIN the return value is undefined. * * @param string $key The cache item key * @param int $step The value to decrement by, defaulting to 1 * - * @return int|bool The new value on success and false on failure + * @return int|false The new value on success and false on failure */ public function decrement($key, $step = 1); } |