Prado\Caching\TCache::set PHP Méthode

set() public méthode

If the cache already contains such a key, the existing value and expiration time will be replaced with the new ones. If the value is empty, the cache key will be deleted.
public set ( $id, $value, $expire, $dependency = null ) : boolean
Résultat boolean true if the value is successfully stored into cache, false otherwise
    public function set($id, $value, $expire = 0, $dependency = null)
    {
        if (empty($value) && $expire === 0) {
            $this->delete($id);
        } else {
            $data = array($value, $dependency);
            return $this->setValue($this->generateUniqueKey($id), $data, $expire);
        }
    }