Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/CacheInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@

namespace React\Cache;

use React\Promise\PromiseInterface;

interface CacheInterface
{
// @return React\Promise\PromiseInterface
/**
* Retrieve an item from the cache, resolves with its value on
* success or rejects when no item can be found.
*
* @param string $key
* @return PromiseInterface
*/
public function get($key);

/**
* Store an item in the cache.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function set($key, $value);

/**
* Remove an item from the cache.
*
* @param string $key
* @return void
*/
public function remove($key);
}