Which backend is currently in use?
Storage
Backend name
Deletes a key from cache.
boolean
true if key existed or false if it didn't
Deletes everything in cache.
boolean
Always true
Looks up a key in cache
TValue
the key value, default value or null
Gets remaining TTL (in milliseconds) for a key or 0 when no TTL has been set
Key to check
number
Remaining TTL in milliseconds
Returns an index of all used keys as an array ['key1', 'key2',..'keyN']
Array<string>
Used keys
Register change listeners
Key name
Function to run when the key changes
Register change listeners
Key name
Function to run when the key changes
Publish data to an event stream
Channel name
Payload to deliver
Reloads the data from browser storage
Sets a key's value.
Key to set. If this value is not set or not a string an exception is raised.
Value to set. This can be any value that is JSON compatible (Numbers, Strings, Objects etc.).
TValue
the used value
Sets a TTL for a key, or remove it if ttl value is 0 or below
boolean
true if key existed or false if it didn't
Remove change listeners
Key name to unregister listeners against
Test if storage is available
boolean
True if storage can be used
Returns a read-only copy of _storage
Read-only copy of _storage
How much space in bytes does the storage take?
number
Storage size in chars (not the same as in bytes, since some chars may take several bytes)
Subscribe to a Publish/Subscribe event stream
Channel name
Function to run when the something is published to the channel
Subscribe to a Publish/Subscribe event stream
Channel name
Function to run when the something is published to the channel