AppCacheService
service
Service for saving or caching data on the users device. It uses the most efficient storage available (IndexDB, localstorage, …) on the device. Depending on the type of storage used, its limitations apply.
Methods
Section titled “Methods”Clear storage, optionally filtered by a function.
clear(filter?: function): Observable<boolean>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| filter | function |
getItem
Section titled “getItem”Get item from storage.
getItem(key: string): Observable<T>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| key | string |
getStorageKeys
Section titled “getStorageKeys”Get all storage keys.
getStorageKeys(): Observable<string[]>removeItem
Section titled “removeItem”Remove item from storage.
removeItem(key: string): Observable<boolean>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| key | string |
setItem
Section titled “setItem”Set item in storage.
setItem(key: string, value: T): Observable<boolean>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| key | string | |
| value | T |
setStorage
Section titled “setStorage”setStorage(options: any): Observable<any>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| options | any |