setItem(key, value, [extra])
This method sets an item and returns it as well.
Arguments
key
(string): A string used to store an item under.value
(any): Any value that can be stored in cache. Depends on adapter you use (and storage this adapter grants access to). See values for more info.extra
(object): It's optional. It allows you to pass additional (extra) data that you want to store alongside value. See how that can be used in lifecycle methods and plugins.
Returns
(Item): Built item, an object.
Example
Last updated