/** * A wrapper for writing data in the cache. * * @param string $hash * A * @param string $data * The data to be cached * @param integer $ttl * A integer representing how long the data should be valid for in minutes. * By default this is null, meaning the data is valid forever * @param string $namespace * Write an item and save in a namespace for ease of bulk operations * later * @return boolean * If an error occurs, this function will return false otherwise true */ public function write($hash, $data, $ttl = null, $namespace = null) { if ($this->cacheProvider instanceof iNamespacedCache) { return $this->cacheProvider->write($hash, $data, $ttl, $namespace); } return $this->cacheProvider->write($hash, $data, $ttl); }
/** * A wrapper for writing data in the cache. * * @param string $hash * A * @param string $data * The data to be cached * @param integer $ttl * A integer representing how long the data should be valid for in minutes. * By default this is null, meaning the data is valid forever * @return boolean * If an error occurs, this function will return false otherwise true */ public function write($hash, $data, $ttl = null) { return $this->cacheProvider->write($hash, $data, $ttl); }