SimplePie_Cache_File::save()publicWP 1.0

Save data to the cache

{} Это метод класса: SimplePie_Cache_File{}

Хуков нет.


true|false. Successfulness


$SimplePie_Cache_File = new SimplePie_Cache_File();
$SimplePie_Cache_File->save( $data );
$data(массив|SimplePie) (обязательный)
Data to store in the cache. If passed a SimplePie object, only cache the $data property

Код SimplePie_Cache_File::save() WP 6.0.2

public function save($data)
	if (file_exists($this->name) && is_writable($this->name) || file_exists($this->location) && is_writable($this->location))
		if ($data instanceof SimplePie)
			$data = $data->data;

		$data = serialize($data);
		return (bool) file_put_contents($this->name, $data);
	return false;