Devin Smith 41e8600690 more deployment changes
partial #3787
added support for deployment to any repo path.
added tagging system
2014-11-18 16:08:23 -08:00

52 lines
1.1 KiB
PHP
Executable File

<?php
namespace Github\HttpClient\Cache;
use Guzzle\Http\Message\Response;
/**
* Caches github api responses
*
* @author Florian Klein <florian.klein@free.fr>
*/
interface CacheInterface
{
/**
* @param string $id The id of the cached resource
*
* @return bool if present
*/
public function has($id);
/**
* @param string $id The id of the cached resource
*
* @return null|integer The modified since timestamp
*/
public function getModifiedSince($id);
/**
* @param string $id The id of the cached resource
*
* @return null|string The ETag value
*/
public function getETag($id);
/**
* @param string $id The id of the cached resource
*
* @return Response The cached response object
*
* @throws \InvalidArgumentException If cache data don't exists
*/
public function get($id);
/**
* @param string $id The id of the cached resource
* @param Response $response The response to cache
*
* @throws \InvalidArgumentException If cache data cannot be saved
*/
public function set($id, Response $response);
}