Delete a value from the specified cache configuration

Parameters

  • string $name The cache configuration to delete from
  • mixed $key Key to be deleted
  • mixed $options Options for the method and strategies.

Returns

boolean True on successful deletion, false otherwise
This method can be filtered.

Source

						public static function delete($name, $key, array $options = array()) {
		$options += array('conditions' => null, 'strategies' => true);
		$settings = static::config();

		if (!isset($settings[$name])) {
			return false;
		}
		$conditions = $options['conditions'];

		if (is_callable($conditions) && !$conditions()) {
			return false;
		}

		$key = static::key($key);
		$method = static::adapter($name)->delete($key);
		$filters = $settings[$name]['filters'];

		if ($options['strategies']) {
			$options += array('key' => $key, 'class' => __CLASS__);
			$key = static::applyStrategies(__FUNCTION__, $name, $key, $options);
		}
		return static::_filter(__FUNCTION__, compact('key'), $method, $filters);
	}