HummingBirdAnimeClient/src/Aviat/Ion/Cache/Driver/DriverInterface.php

51 lines
816 B
PHP
Raw Normal View History

2016-04-05 13:19:35 -04:00
<?php
/**
* Ion
*
* Building blocks for web development
*
2016-04-08 14:25:45 -04:00
* @package Ion
* @author Timothy J. Warren
2016-04-05 13:19:35 -04:00
* @copyright Copyright (c) 2015 - 2016
2016-04-08 14:25:45 -04:00
* @license MIT
2016-04-05 13:19:35 -04:00
*/
namespace Aviat\Ion\Cache\Driver;
2016-04-05 13:19:35 -04:00
/**
* Interface for cache drivers
*/
interface DriverInterface {
2016-04-08 14:25:45 -04:00
/**
* Retreive a value from the cache backend
*
* @param string $key
* @return mixed
*/
public function get($key);
2016-04-05 13:19:35 -04:00
2016-04-08 14:25:45 -04:00
/**
* Set a cached value
*
* @param string $key
* @param mixed $value
* @return DriverInterface
2016-04-08 14:25:45 -04:00
*/
public function set($key, $value);
2016-04-05 13:19:35 -04:00
2016-04-08 14:25:45 -04:00
/**
* Invalidate a cached value
*
* @param string $key
* @return DriverInterface
2016-04-08 14:25:45 -04:00
*/
public function invalidate($key);
2016-04-08 14:25:45 -04:00
/**
* Clear the contents of the cache
*
* @return void
*/
public function invalidateAll();
2016-04-05 13:19:35 -04:00
}
// End of DriverInterface.php