Skip to content

Global Helpers

appCacheWrite()

appCacheWrite() — returns boolean

Available in: controller, model, mapper, migrator, migration, tabledefinition Category: Caching Functions

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).

NameTypeRequiredDefaultDescription
keyanyyes—A string, or a struct or array of values (struct key order doesn’t matter).
valueanyyes—The value to cache.
timenumericno[runtime expression]How long to keep the value, in cacheDatePart units (minutes by default).