Almacena un valor en cache asociado a una clave
@param string $key
@param type $data
@param int $ttl
423972
public function store($key, $data, $ttl=0){
        return $this->connection->set($key, $this->preperaData($data), $ttl);
    }
1282931
public function createDir($key, $ttl = 0)
    {
        $data = ['dir' => 'true'];

        if ($ttl) {
            $data['ttl'] = $ttl;
        }

        return $this->httpPut($this->getKeyUrl($key), $data, ['prevExist' => 'false']);
    }
2710
protected function doSet(string $key, $value, int $ttl = 0)
    {
        if ($ttl > 0) {
            $ttl = \time() + $ttl;
        }

        $filename = $this->getFilename($key);
        $content = '<?php /* ' . Serialize::encode([
                'value' => $value,
                'expire' => $ttl,
            ]) . ' */';

        return $this->storage->put($filename, $content);
    }
1245747
public function save($key, $item, $ttl = null)
    {
        try {
            $this->handler->set($key, $item, $ttl);
        } catch (\Exception $e) {
            return $e->getMessage();
        }
        return true;
    }
907617
public function read( $key, $ttl = null ) {
		$filename = $this->has( $key, $ttl );

		if ( $filename ) {
			return file_get_contents( $filename );
		}

		return false;
	}
387294
public function set($key, $data) {
        $key = $this->prepare_key($key);
        return apcu_store($key, $data, $this->definition->get_ttl());
    }
817961
public function set($key, $value, $ttl = null)
    {
        if ($this->enabled()) {
            return $this->manager->set($key, $value, $ttl);
        }

        return $value;
    }
298430
public function set($key, $value, $ttl = 0)
    {
        $key = $this->salted($key, $this->suffix);

        // handle deletions
        if ($value === null) {
            $this->cache->delete($key);
            return true;
        }

        // Resolve the TTL to use
        $ttl = $this->determineTTL($ttl);

        $this->cache->set($key, $value, $ttl);
        $code = $this->cache->getResultCode();

        if ($code === Memcached::RES_SUCCESS) {
            return true;
        }

        $this->sendAlert('set', $key, $code);
        return false;
    }
336508
public function set($key, $value, $ttl)
    {
        return self::getCacheDriver()->set($key, $value, $ttl);
    }
1362402
public function set($key, $data, $ttl = 3600)
    {
        if (empty($this->memcache)) {
            return false;
        }

        $key = $this->processKey($key);

        $compress = !empty($this->compress) ? MEMCACHE_COMPRESSED : 0;

        return $this->memcache->set($key, $data, $compress, $ttl);
    }
552716
public function set($key, array $nodes, $ttl)
    {
        $this->records[$key] = ['nodes' => $nodes, 'expire' => time() + $ttl];

        return true;
    }
53805
public function set($key, $value, $ttl = false)
    {
        return apc_store($key, $value, (int)$ttl);
    }
423923
public function store($key,$data,$ttl=0) {
        //Abro/Creo el archivo en modo lectura/escritura
        $file = fopen($this->getFileName($key),'a+');
        if(!$file){return FALSE;}
        //Consigo un bloqueo exclusivo
        flock($file,LOCK_EX);
        //Trunco el archivo en caso de que existieran datos viejos
        ftruncate($file,0);
        //Serializo los datos y los guardo con una fecha de expiracion , si es 0 se lo deja indefinidamente
        if($ttl != 0){
            $ttl= time() + $ttl;
        }
        $data = $this->preperaData(array($ttl,$data));
        if (fwrite($file,$data)===false) {return FALSE;}
        return fclose($file);
    }
1065536
final public function expireat($key, $ttl) {
		$res = $this->connection->expireat($key, $ttl);
		self::$logger->info(sprintf(
			"Redis: expireat %s: %s.", $key, $ttl));
		return $res;
	}
927254
public function set($key, $value, $ttl = null)
	{
		$this->connect();
        
		$oldKey = $key;
		
		$key = $this->formatKey($key);
		$value = $this->encodeValue($value);
		$ttl = $ttl ? $ttl : $this->options['ttl'];

		$this->driver->set($key, $value, $ttl);
        
		return (bool) ($this->driver->getResultCode() == \Memcached::RES_SUCCESS);
	}
809051
function set($key,$val,$ttl=0) {
		$fw=Base::instance();
		if (!$this->dsn)
			return TRUE;
		$ndx=$this->prefix.'.'.$key;
		if ($cached=$this->exists($key))
			$ttl=$cached[1];
		$data=$fw->serialize([$val,microtime(TRUE),$ttl]);
		$parts=explode('=',$this->dsn,2);
		switch ($parts[0]) {
			case 'apc':
			case 'apcu':
				return call_user_func($parts[0].'_store',$ndx,$data,$ttl);
			case 'redis':
				return $this->ref->set($ndx,$data,$ttl?['ex'=>$ttl]:[]);
			case 'memcache':
				return memcache_set($this->ref,$ndx,$data,0,$ttl);
			case 'memcached':
				return $this->ref->set($ndx,$data,$ttl);
			case 'wincache':
				return wincache_ucache_set($ndx,$data,$ttl);
			case 'xcache':
				return xcache_set($ndx,$data,$ttl);
			case 'folder':
				return $fw->write($parts[1].
					str_replace(['/','\\'],'',$ndx),$data);
		}
		return FALSE;
	}
401158
public function setEntry($Key, $Value, $TTL = 3600)
    {
        $Value = $this->serializeEntry($Value);
        if ($this->Using === 'APCu') {
            if (apcu_store($Key, $Value, $TTL)) {
                return $this->Modified = true;
            }
            return false;
        }
        if ($this->Using === 'Memcached') {
            if ($TTL >= 2592000) {
                $TTL += time();
            }
            if ($this->WorkingData->set($Key, $Value, $TTL)) {
                return $this->Modified = true;
            }
            return false;
        }
        if ($this->Using === 'Redis') {
            if ($this->WorkingData->set($Key, $Value, $TTL)) {
                return $this->Modified = true;
            }
            return false;
        }
        if ($this->Using === 'PDO') {
            if ($TTL > 0) {
                $TTL += time();
            }
            $PDO = $this->WorkingData->prepare(self::setQuery);
            if ($PDO !== false && $PDO->execute([
                'key' => $Key,
                'data' => $Value,
                'time' => $TTL,
                'key2' => $Key,
                'data2' => $Value,
                'time2' => $TTL
            ])) {
                return ($PDO->rowCount() > 0 && $this->Modified = true);
            }
            return false;
        }
        if (is_array($this->WorkingData)) {
            if ($TTL > 0) {
                $TTL += time();
                $this->WorkingData[$Key] = ['Data' => $Value, 'Time' => $TTL];
            } else {
                $this->WorkingData[$Key] = $Value;
            }
            return $this->Modified = true;
        }
        return false;
    }