diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2019-11-17 20:45:02 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2019-11-17 20:45:02 +0100 |
commit | 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 (patch) | |
tree | 4d541098d751d5a9acf8c12f6fb9f308ace066ac /vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php | |
download | flyspray-8df3db566a3a937b45ebf11adb90d265e6f5e2d4.tar.xz |
initial checking of customized version 1.0rc9
Diffstat (limited to 'vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php')
-rw-r--r-- | vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php new file mode 100644 index 0000000..970c9e2 --- /dev/null +++ b/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php @@ -0,0 +1,55 @@ +<?php + +namespace Guzzle\Cache; + +/** + * Interface for cache adapters. + * + * Cache adapters allow Guzzle to utilize various frameworks for caching HTTP responses. + * + * @link http://www.doctrine-project.org/ Inspired by Doctrine 2 + */ +interface CacheAdapterInterface +{ + /** + * Test if an entry exists in the cache. + * + * @param string $id cache id The cache id of the entry to check for. + * @param array $options Array of cache adapter options + * + * @return bool Returns TRUE if a cache entry exists for the given cache id, FALSE otherwise. + */ + public function contains($id, array $options = null); + + /** + * Deletes a cache entry. + * + * @param string $id cache id + * @param array $options Array of cache adapter options + * + * @return bool TRUE on success, FALSE on failure + */ + public function delete($id, array $options = null); + + /** + * Fetches an entry from the cache. + * + * @param string $id cache id The id of the cache entry to fetch. + * @param array $options Array of cache adapter options + * + * @return string The cached data or FALSE, if no cache entry exists for the given id. + */ + public function fetch($id, array $options = null); + + /** + * Puts data into the cache. + * + * @param string $id The cache id + * @param string $data The cache entry/data + * @param int|bool $lifeTime The lifetime. If != false, sets a specific lifetime for this cache entry + * @param array $options Array of cache adapter options + * + * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise. + */ + public function save($id, $data, $lifeTime = false, array $options = null); +} |