SimplePie_Cache_MySQL::unlink

Advertisement

Summery Summery

Remove the cache

Syntax Syntax

SimplePie_Cache_MySQL::unlink()

Return Return

(bool) Success status

Source Source

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

		return $query->execute() && $query->rowCount() > 0;
	}

	/**
	 * Remove the cache
	 *
	 * @return bool Success status
	 */
	public function unlink()
	{
		if ($this->mysql === null)
		{
			return false;
		}

		$query = $this->mysql->prepare('DELETE FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
		$query->bindValue(':id', $this->id);
		$query2 = $this->mysql->prepare('DELETE FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :id');
		$query2->bindValue(':id', $this->id);

Advertisement

Advertisement

Leave a Reply