Global Helpers
appCacheWrite()
Signature
Section titled “Signature”appCacheWrite() — returns boolean
Available in: controller, model, mapper, migrator, migration, tabledefinition
Category: Caching Functions
Description
Section titled “Description”Caches value under key for time, replacing any entry already there. Complex values are
stored as a copy. Returns false when the value wasn’t stored because the cache is full
(maximumItemsToCache).
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
key | any | yes | — | A string, or a struct or array of values (struct key order doesn’t matter). |
value | any | yes | — | The value to cache. |
time | numeric | no | [runtime expression] | How long to keep the value, in cacheDatePart units (minutes by default). |