cache-local.ais
execute(input)
cache = service "cache_local"
cached = cache.get(input.key)
if cached != null
return { value: cached, cached: true }
end
// Structured values are copied at the cache boundary, not shared by reference.
cache.put(input.key, input.value, input.ttlSeconds)
return { value: input.value, cached: false }
end
All examples