PluginProbe
Media Cloud Sync / 1.2.4
Media Cloud Sync v1.2.4
1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 All 34 releases
media-cloud-sync / includes / sdk / google / psr / cache / src / CacheItemPoolInterface.php

CacheItemPoolInterface.php in Media Cloud Sync 1.2.4, at includes/sdk/google/psr/cache/src/CacheItemPoolInterface.php

130 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Dudlewebs\WPMCS\Psr\Cache;
4
5 /**
6 * CacheItemPoolInterface generates CacheItemInterface objects.
7 *
8 * The primary purpose of Cache\CacheItemPoolInterface is to accept a key from
9 * the Calling Library and return the associated Cache\CacheItemInterface object.
10 * It is also the primary point of interaction with the entire cache collection.
11 * All configuration and initialization of the Pool is left up to an
12 * Implementing Library.
13 */
14 interface CacheItemPoolInterface
15 {
16 /**
17 * Returns a Cache Item representing the specified key.
18 *
19 * This method must always return a CacheItemInterface object, even in case of
20 * a cache miss. It MUST NOT return null.
21 *
22 * @param string $key
23 * The key for which to return the corresponding Cache Item.
24 *
25 * @throws InvalidArgumentException
26 * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
27 * MUST be thrown.
28 *
29 * @return CacheItemInterface
30 * The corresponding Cache Item.
31 */
32 public function getItem($key);
33 /**
34 * Returns a traversable set of cache items.
35 *
36 * @param string[] $keys
37 * An indexed array of keys of items to retrieve.
38 *
39 * @throws InvalidArgumentException
40 * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
41 * MUST be thrown.
42 *
43 * @return array|\Traversable
44 * A traversable collection of Cache Items keyed by the cache keys of
45 * each item. A Cache item will be returned for each key, even if that
46 * key is not found. However, if no keys are specified then an empty
47 * traversable MUST be returned instead.
48 */
49 public function getItems(array $keys = array());
50 /**
51 * Confirms if the cache contains specified cache item.
52 *
53 * Note: This method MAY avoid retrieving the cached value for performance reasons.
54 * This could result in a race condition with CacheItemInterface::get(). To avoid
55 * such situation use CacheItemInterface::isHit() instead.
56 *
57 * @param string $key
58 * The key for which to check existence.
59 *
60 * @throws InvalidArgumentException
61 * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
62 * MUST be thrown.
63 *
64 * @return bool
65 * True if item exists in the cache, false otherwise.
66 */
67 public function hasItem($key);
68 /**
69 * Deletes all items in the pool.
70 *
71 * @return bool
72 * True if the pool was successfully cleared. False if there was an error.
73 */
74 public function clear();
75 /**
76 * Removes the item from the pool.
77 *
78 * @param string $key
79 * The key to delete.
80 *
81 * @throws InvalidArgumentException
82 * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
83 * MUST be thrown.
84 *
85 * @return bool
86 * True if the item was successfully removed. False if there was an error.
87 */
88 public function deleteItem($key);
89 /**
90 * Removes multiple items from the pool.
91 *
92 * @param string[] $keys
93 * An array of keys that should be removed from the pool.
94 * @throws InvalidArgumentException
95 * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
96 * MUST be thrown.
97 *
98 * @return bool
99 * True if the items were successfully removed. False if there was an error.
100 */
101 public function deleteItems(array $keys);
102 /**
103 * Persists a cache item immediately.
104 *
105 * @param CacheItemInterface $item
106 * The cache item to save.
107 *
108 * @return bool
109 * True if the item was successfully persisted. False if there was an error.
110 */
111 public function save(CacheItemInterface $item);
112 /**
113 * Sets a cache item to be persisted later.
114 *
115 * @param CacheItemInterface $item
116 * The cache item to save.
117 *
118 * @return bool
119 * False if the item could not be queued or if a commit was attempted and failed. True otherwise.
120 */
121 public function saveDeferred(CacheItemInterface $item);
122 /**
123 * Persists any deferred cache items.
124 *
125 * @return bool
126 * True if all not-yet-saved items were successfully saved or there were none. False otherwise.
127 */
128 public function commit();
129 }
130