SimplePie_Cache_File::save

Advertisement

Summery Summery

Save data to the cache

Syntax Syntax

SimplePie_Cache_File::save( array|SimplePie $data )

Parameters Parameters

$data

(array|SimplePie) (Required) Data to store in the cache. If passed a SimplePie object, only cache the $data property

Return Return

(bool) Successfulness

Source Source

File: wp-includes/SimplePie/Cache/File.php

	{
		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;
	}

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.