Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6749 Rev 6849
Línea 75... Línea 75...
75
    /**
75
    /**
76
     * 
76
     * 
77
     * @param string $key
77
     * @param string $key
78
     * @param mixed $value
78
     * @param mixed $value
79
     */
79
     */
80
    public function add($key, $value)
80
    public function setItem($key, $value)
81
    {
81
    {
82
        $this->memcached->add($key, $value, $this->ttl);
82
        $this->memcached->add($key, $value, $this->ttl);
83
    }
83
    }
Línea 84... Línea 84...
84
    
84
    
Línea 96... Línea 96...
96
    /**
96
    /**
97
     *
97
     *
98
     * @param string $key
98
     * @param string $key
99
     * @return boolean
99
     * @return boolean
100
     */
100
     */
101
    public function delete($key)
101
    public function removeItem($key)
102
    {
102
    {
103
        return $this->memcached->delete($key);
103
        return $this->memcached->delete($key);
104
    }
104
    }
Línea -... Línea 105...
-
 
105
    
-
 
106
    
-
 
107
    
-
 
108
    /**
-
 
109
     *
-
 
110
     * @param string $key
-
 
111
     * @return boolean
-
 
112
     */
-
 
113
    public function hasItem($key)
-
 
114
    {
-
 
115
        $value = $this->memcached->get($key);
-
 
116
        if($value === \Memcached::RES_NOTFOUND) {
-
 
117
            return false;
-
 
118
        } else {
-
 
119
            return true;
-
 
120
        }
-
 
121
    }
105
    
122
    
106
    
123
    
107
    /**
124
    /**
108
     *
125
     *
109
     * @param string $key
126
     * @param string $key
110
     * @return mixed
127
     * @return mixed
111
     */
128
     */
112
    public function get($key)
129
    public function getItem($key)
113
    {
130
    {
114
        $value = $this->memcached->get($key);
131
        $value = $this->memcached->get($key);
115
        if($value === \Memcached::RES_NOTFOUND) {
132
        if($value === \Memcached::RES_NOTFOUND) {