Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: Stixlink
- * Date: 10.07.14
- * Time: 19:38
- */
- namespace services;
- require_once('/../interfaces/ICache.php');
- use interfaces\ICache;
- class ManageCache implements ICache {
- private $_cache;
- public function __construct(ICache $cache) {
- $this->_cache = $cache;
- }
- /**
- * @param string $key
- *
- * @return mixed
- */
- public function get($key) {
- return $this->_cache->get($key);
- }
- /**
- * @param string $key
- * @param mixed $value
- * @param int $duration
- */
- public function set($key, $value, $duration = 3600) {
- $this->_cache->set($key, $value, $duration);
- }
- /**
- * @param string $key
- */
- public function delete($key) {
- $this->_cache->delete($key);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement