Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / memcache / src / DrupalMemcacheInterface.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\memcache\DrupalMemcacheInterface.
6  */
7
8 namespace Drupal\memcache;
9
10 /**
11  * Class DrupalMemcacheInterface.
12  */
13 interface DrupalMemcacheInterface {
14
15   /**
16    * Adds an item into memcache.
17    *
18    * @param string $key
19    *   The string with which you will retrieve this item later.
20    * @param mixed $value
21    *   The item to be stored.
22    * @param int $exp
23    *   Parameter expire is expiration time in seconds. If it's 0, the item never
24    *   expires (but memcached server doesn't guarantee this item to be stored
25    *   all the time, it could be deleted from the cache to make place for other
26    *   items).
27    * @param bool $flag
28    *   If using the older memcache PECL extension as opposed to the newer
29    *   memcached PECL extension, the MEMCACHE_COMPRESSED flag can be set to use
30    *   zlib to store a compressed copy of the item.  This flag option is
31    *   completely ignored when using the newer memcached PECL extension.
32    *
33    * @return bool
34    *   Whether or not the add was successful.
35    */
36   public function set($key, $value, $exp = 0, $flag = FALSE);
37
38   /**
39    * Retrieves a value from Memcache.
40    *
41    * @param string $key
42    *   The key with which the item was stored.
43    *
44    * @return mixed
45    *   The item that was originally saved, or FALSE otherwise.
46    */
47   public function get($key);
48
49   /**
50    * Retrieves multiple values from Memcache.
51    *
52    * @param array $keys
53    *   An array of keys for items to retrieve.
54    *
55    * @return array
56    *   An array of stored items, or FALSE otherwise.
57    */
58   public function getMulti(array $keys);
59
60   /**
61    * Deletes an item from Memcache.
62    *
63    * @param string $key
64    *   The key to delete from storage.
65    *
66    * @return bool
67    *   TRUE on success or FALSE on failure.
68    */
69   public function delete($key);
70
71   /**
72    * Prepares the memcache key.
73    *
74    * @param string $key
75    *   The raw cache key.
76    *
77    * @return string
78    *   The prepared cache key.
79    */
80   public function key($key);
81
82   /**
83    * Immediately invalidates all existing items.
84    *
85    * flush doesn't actually free any resources, it only marks all the
86    * items as expired, so occupied memory will be overwritten by new items.
87    *
88    * @return bool
89    *   TRUE on success or FALSE on failure.
90    */
91   public function flush();
92
93   /**
94    * Closes the memacache instance connection.
95    */
96   public function close();
97
98   /**
99    * Adds a memcache server.
100    *
101    * @param string $server_path
102    *   The server path including port.
103    * @param bool $persistent
104    *   Whether this server connection is persistent or not.
105    */
106   public function addServer($server_path, $persistent = FALSE);
107 }