PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 2.2.0
Independent Analytics – WordPress Analytics Plugin v2.2.0
2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / vendor / psr / simple-cache / src / CacheInterface.php
independent-analytics / vendor / psr / simple-cache / src Last commit date
CacheException.php 2 years ago CacheInterface.php 2 years ago InvalidArgumentException.php 2 years ago
CacheInterface.php
109 lines
1 <?php
2
3 namespace IAWP_SCOPED\Psr\SimpleCache;
4
5 /** @internal */
6 interface CacheInterface
7 {
8 /**
9 * Fetches a value from the cache.
10 *
11 * @param string $key The unique key of this item in the cache.
12 * @param mixed $default Default value to return if the key does not exist.
13 *
14 * @return mixed The value of the item from the cache, or $default in case of cache miss.
15 *
16 * @throws \Psr\SimpleCache\InvalidArgumentException
17 * MUST be thrown if the $key string is not a legal value.
18 */
19 public function get($key, $default = null);
20 /**
21 * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
22 *
23 * @param string $key The key of the item to store.
24 * @param mixed $value The value of the item to store, must be serializable.
25 * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
26 * the driver supports TTL then the library may set a default value
27 * for it or let the driver take care of that.
28 *
29 * @return bool True on success and false on failure.
30 *
31 * @throws \Psr\SimpleCache\InvalidArgumentException
32 * MUST be thrown if the $key string is not a legal value.
33 */
34 public function set($key, $value, $ttl = null);
35 /**
36 * Delete an item from the cache by its unique key.
37 *
38 * @param string $key The unique cache key of the item to delete.
39 *
40 * @return bool True if the item was successfully removed. False if there was an error.
41 *
42 * @throws \Psr\SimpleCache\InvalidArgumentException
43 * MUST be thrown if the $key string is not a legal value.
44 */
45 public function delete($key);
46 /**
47 * Wipes clean the entire cache's keys.
48 *
49 * @return bool True on success and false on failure.
50 */
51 public function clear();
52 /**
53 * Obtains multiple cache items by their unique keys.
54 *
55 * @param iterable $keys A list of keys that can obtained in a single operation.
56 * @param mixed $default Default value to return for keys that do not exist.
57 *
58 * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
59 *
60 * @throws \Psr\SimpleCache\InvalidArgumentException
61 * MUST be thrown if $keys is neither an array nor a Traversable,
62 * or if any of the $keys are not a legal value.
63 */
64 public function getMultiple($keys, $default = null);
65 /**
66 * Persists a set of key => value pairs in the cache, with an optional TTL.
67 *
68 * @param iterable $values A list of key => value pairs for a multiple-set operation.
69 * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
70 * the driver supports TTL then the library may set a default value
71 * for it or let the driver take care of that.
72 *
73 * @return bool True on success and false on failure.
74 *
75 * @throws \Psr\SimpleCache\InvalidArgumentException
76 * MUST be thrown if $values is neither an array nor a Traversable,
77 * or if any of the $values are not a legal value.
78 */
79 public function setMultiple($values, $ttl = null);
80 /**
81 * Deletes multiple cache items in a single operation.
82 *
83 * @param iterable $keys A list of string-based keys to be deleted.
84 *
85 * @return bool True if the items were successfully removed. False if there was an error.
86 *
87 * @throws \Psr\SimpleCache\InvalidArgumentException
88 * MUST be thrown if $keys is neither an array nor a Traversable,
89 * or if any of the $keys are not a legal value.
90 */
91 public function deleteMultiple($keys);
92 /**
93 * Determines whether an item is present in the cache.
94 *
95 * NOTE: It is recommended that has() is only to be used for cache warming type purposes
96 * and not to be used within your live applications operations for get/set, as this method
97 * is subject to a race condition where your has() will return true and immediately after,
98 * another script can remove it making the state of your app out of date.
99 *
100 * @param string $key The cache item key.
101 *
102 * @return bool
103 *
104 * @throws \Psr\SimpleCache\InvalidArgumentException
105 * MUST be thrown if the $key string is not a legal value.
106 */
107 public function has($key);
108 }
109