Example #1
0
 /**
  * Set the value to a key.
  * 
  * This method returns true on success and false on failure.
  * $ttl is measured in seconds. If it is zero, the key should not expire.
  * 
  * @param string $key
  * @param mixed $value
  * @param int $ttl
  * @param bool $force
  * @return bool
  */
 public function set($key, $value, $ttl = 0, $force = false)
 {
     return Storage::writePHPData($this->_getFilename($key), array($ttl ? time() + $ttl : 0, $value), $key);
 }