getKey(); return update_option( $key, $this->getSerializable(), false ); } /** * Retrieve and unserialize this object from WordPress options table * @return bool whether object existed in cache */ public function fetch(){ $key = 'loco_'.$this->getKey(); if( $data = get_option($key) ){ try { $this->setUnserialized($data); return true; } catch( InvalidArgumentException $e ){ // suppress validation error // @codeCoverageIgnore } } return false; } /** * Delete option from WordPress */ public function remove(){ $key = 'loco_'.$this->getKey(); return delete_option( $key ); } }