$cache→deleteFor()
Delete one or more caches in a given namespace
Example
// Delete all in namespace
$cache->deleteFor("my-namespace");
// Delete one cache in namespace
$cache->deleteFor("my-namespace", "my-cache-name");Usage
// basic usage
$bool = $cache->deleteFor(string $ns);
// usage with all arguments
$bool = $cache->deleteFor(string $ns, string $name = '');Arguments
| Name | Type(s) | Description |
|---|---|---|
$ns | string | Namespace of cache. |
$name (optional) | string | Name of cache. If none specified, all for namespace are deleted. |
Return value
boolTrue on success, false on failure
API reference based on ProcessWire core version 3.0.252