Cache
Constructors
new Cache()
new Cache():
Cache
Returns
Methods
clearCache()
staticclearCache(id?):Promise<void>
Clear the cached data related to this cache id. If not cache id provided => clear all cache ids
Parameters
| Parameter | Type |
|---|---|
id? | string |
Returns
Promise<void>
clearPendingChanges()
staticclearPendingChanges():Promise<void>
Clear the list of pending changes without applying or syncing them.
Returns
Promise<void>
getCacheEntries()
staticgetCacheEntries():Observable<string[]>
Return the list of cache ids saved in previous execute or observe
Returns
Observable<string[]>
getPendingChanges()
staticgetPendingChanges():Promise<string>
Return a string containing all changes and there related files. This method can be used to "backup" pending changes at any point in time before a synchronisation
Returns
Promise<string>
getProcessingErrors()
staticgetProcessingErrors():Observable<boolean>
Return an Observable which emit a new value for each Error encountered when processing data results asynchronously
Returns
Observable<boolean>
getProcessingStatus()
staticgetProcessingStatus():Observable<CacheStatus>
Return an Observable which returns the current processing status of the Cache layer.
processing is set to TRUE if the Cache is processing some queries or downloading files to keep the offline database up-to-date
Returns
Observable<CacheStatus>
hasPendingChanges()
statichasPendingChanges():Observable<boolean>
Return an observable which gets TRUE if one or more changes must be synced with remoted database
Returns
Observable<boolean>
loadPendingChanges()
staticloadPendingChanges(data):Promise<void>
Load the given pending changes into the local offline database
Parameters
| Parameter | Type |
|---|---|
data | string |
Returns
Promise<void>
synchroniseChanges()
staticsynchroniseChanges():Observable<[number,number]>
Sync the local changes made offline with the online data source Returns an observable in the form [nbChanges, nbSyncedChanges]
Returns
Observable<[number, number]>