addExtra(key, extra)
Adds extra to item's existing extra. New properties are added, existing are overwritten.
Last updated
Adds extra to item's existing extra. New properties are added, existing are overwritten.
Last updated
// Existing extra in an item
{
some: 'data'
}
cache.addExtra(key, { foo: 'bar' });
// Extra after adding new one
{
foo: 'bar',
some: 'data'
}
cache.addExtra(key, { foo: 'baz' });
// Extra after another round of adding stuff to it
{
foo: 'baz', // <-- notice that this value's changed
some: 'data'
}