Storage
Direct Subclass:
Constructor Summary
Public Constructor | ||
public |
constructor(prefix: *, storeAdapter: *) |
Member Summary
Public Members | ||
public |
Storage key prefix |
|
public |
storeAdapter: Adapter Adapter for storing and getting values |
Method Summary
Public Methods | ||
public |
Get value from storage. |
|
public |
Remove item from storage. |
|
public |
Set new item to storage. |
Private Methods | ||
private |
_parseEncodedValue(object: union, key: string): union Parse object saved in storage. |
Public Constructors
public constructor(prefix: *, storeAdapter: *) source
Params:
Name | Type | Attribute | Description |
prefix | * | Storage key prefix |
|
storeAdapter | * | Adapter for storing and getting values |
Public Members
Public Methods
public get(key: string): union source
Get value from storage.
Params:
Name | Type | Attribute | Description |
key | string | storage key |
Return:
union | content of storage |
public remove(key: string) source
Remove item from storage.
Params:
Name | Type | Attribute | Description |
key | string | key to remove |
public set(key: string, value: union, expire: nullable): void source
Set new item to storage.
Params:
Name | Type | Attribute | Description |
key | string | key of item |
|
value | union | value of item |
|
expire | nullable | date of expire |
Return:
void |