Cashe something for x number of seconds using a given key

cache:put(key
, value
, ttl: 1)

# note: can only cache for x number of seconds (integer) e.g. 1,2,5 but not 1.2 (float)

# lets cache x for 60 seconds (it can be cached for as long as you like) and the value can be up to 32MB
cache:put('x', 'hi there 2', 60)
#=> TRUE

cache:get('x');
#=> "hi there 2"

Copyright ©2013-2022 SunSed®. All rights reserved.