SimplePie_Cache_Redis::save() public WP 1.0
Save data to the cache
{} Это метод класса: SimplePie_Cache_Redis{}
Хуков нет.
Возвращает
true|false
. Successfulness
Использование
$SimplePie_Cache_Redis = new SimplePie_Cache_Redis(); $SimplePie_Cache_Redis->save( $data );
- $data(массив/SimplePie) (обязательный)
- Data to store in the cache. If passed a SimplePie object, only cache the $data property
Код SimplePie_Cache_Redis::save() SimplePie Cache Redis::save WP 5.7.1
public function save($data) {
if ($data instanceof SimplePie) {
$data = $data->data;
}
$response = $this->cache->set($this->name, serialize($data));
if ($this->options['expire']) {
$this->cache->expire($this->name, $this->options['expire']);
}
return $response;
}