Debian Codegraph @

lib/3rdParty/composer/aws/aws-sdk-php/src/DoctrineCacheAdapter.php

raw symbols SCIP
1 <?php
2 namespace Aws;
3
4 use Doctrine\Common\Cache\Cache;
5
6 class DoctrineCacheAdapter implements CacheInterface, Cache
7 {
8 /** @var Cache */
9 private $cache;
10
11 public function __construct(Cache $cache)
12 {
13 $this->cache = $cache;
14 }
15
16 public function get($key)
17 {
18 return $this->cache->fetch($key);
19 }
20
21 /**
22 * @return mixed
23 */
24 public function fetch($key)
25 {
26 return $this->get($key);
27 }
28
29 public function set($key, $value, $ttl = 0)
30 {
31 return $this->cache->save($key, $value, $ttl);
32 }
33
34 /**
35 * @return bool
36 */
37 public function save($key, $value, $ttl = 0)
38 {
39 return $this->set($key, $value, $ttl);
40 }
41
42 public function remove($key)
43 {
44 return $this->cache->delete($key);
45 }
46
47 /**
48 * @return bool
49 */
50 public function delete($key)
51 {
52 return $this->remove($key);
53 }
54
55 /**
56 * @return bool
57 */
58 public function contains($key)
59 {
60 return $this->cache->contains($key);
61 }
62
63 /**
64 * @return mixed[]|null
65 */
66 public function getStats()
67 {
68 return $this->cache->getStats();
69 }
70 }