$cachesaveRaw()

Save raw cache row from array returned by getRaw()

Given array must contain the following:

Optional: To save with a namespace (ns), prefix namespace to name like ns__cacheName, if name is not already namespaced.

Available since version 3.0.268.

Example

[
  'name' => 'name-of-cache',
  'expires' => '2028-04-08 03:10:01', // ISO-8601 DATE/TIME
  'data' => 'Raw cache data string JSON or other string'
]

Usage

$bool = $cache->saveRaw(array $a);

Arguments

NameType(s)Description
$aarray

Array containing ['name' => '…', 'expires' => '…', 'data' => '…' ]

Return value

bool

True on success, false on fail

Exceptions

Method can throw exceptions on error:

  • WireException - On all errors

See Also


$cache methods and properties

API reference based on ProcessWire core version 3.0.268