Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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
    public function fetch($key)
22
    {
23
        return $this->get($key);
24
    }
25
 
26
    public function set($key, $value, $ttl = 0)
27
    {
28
        return $this->cache->save($key, $value, $ttl);
29
    }
30
 
31
    public function save($key, $value, $ttl = 0)
32
    {
33
        return $this->set($key, $value, $ttl);
34
    }
35
 
36
    public function remove($key)
37
    {
38
        return $this->cache->delete($key);
39
    }
40
 
41
    public function delete($key)
42
    {
43
        return $this->remove($key);
44
    }
45
 
46
    public function contains($key)
47
    {
48
        return $this->cache->contains($key);
49
    }
50
 
51
    public function getStats()
52
    {
53
        return $this->cache->getStats();
54
    }
55
}