addExtra(key, extra)
Adds extra to item's existing extra. New properties are added, existing are overwritten.
Arguments
key(string): Key to store the extra under (represents given item).extra(object): Extra data to store.
Throws
If
extrais not an object, it will throw'extra' must be an object.
Lifecycle
preAddExtra
Event name:
preAddExtraProperties passed:cacheInstancereference to cache instance (this)keykey passed toaddExtramethodextraextra passed toaddExtramethod
Returns: (object): object containing properties:
cacheInstancereference to cache instance (this)keykey passed through handlers added forpreAddExtraeventextraextra passed through handlers added forpreAddExtraevent
postAddExtra
Event name:
postAddExtraProperties passed:cacheInstancereference to cache instance (this) returned bypreAddExtrakeykey returned bypreAddExtraextraextra (object) returned by adapter using its addExtra method
Returns: (object): object containing properties:
cacheInstancereference to cache instance (this)keykey passed through handlers added forpostAddExtraeventextraextra passed through handlers added forpostAddExtraevent
Eventually
addExtrareturns extra returned bypostAddExtra.
Example
Last updated