Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function doSave($id, $data, $lifeTime = 0)
 {
     try {
         $object = new Object($id);
         $object->setContent(serialize($data));
         if ($lifeTime > 0) {
             $object->addMetadata(self::EXPIRES_HEADER, (string) (time() + $lifeTime));
         }
         $this->bucket->put($object);
         return true;
     } catch (Exception\RiakException $e) {
         // Do nothing
     }
     return false;
 }