Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16768 | Rev 16785 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16768 Rev 16769
Línea 6... Línea 6...
6
 
6
 
7
class CacheImpl implements CacheInterface
7
class CacheImpl implements CacheInterface
Línea 8... Línea 8...
8
{
8
{
9
    
-
 
10
    private $memcached;
9
    
11
    
-
 
12
    
-
 
13
    /**
-
 
14
     *
-
 
15
     * @var CacheInterface
-
 
Línea 16... Línea 10...
16
     */
10
    private $memcached;
17
    private static $_instance;
11
 
18
    
12
    
Línea 39... Línea 33...
39
    
33
    
40
    
34
    
41
    /**
35
    /**
42
     *
-
 
43
     * @param Array $config
-
 
44
     * @return CacheImpl
-
 
45
     */
-
 
46
    public static function getInstance($config)
-
 
47
    {
-
 
48
        if(self::$_instance == null) {
-
 
49
            self::$_instance = new CacheImpl($config);
-
 
50
        }
-
 
51
        return self::$_instance;
-
 
52
    }
-
 
53
    
-
 
54
    /**
-
 
55
     *
36
     *
56
     * @param Array $config
37
     * @param Array $config
57
     */
38
     */
58
    private function __construct($config)
39
    public function __construct($config)
59
    {
40
    {
60
        $this->ttl    = intval($config['leaderslinked.memcache.ttl'], 10);
41
        $this->ttl    = intval($config['leaderslinked.memcache.ttl'], 10);