Skip to main content
Version: 2.9

Cache

Index

Constructors

constructor

Methods

staticclearCache

  • clearCache(id?: string): Promise<void>
  • Clear the cached data related to this cache id. If not cache id provided =&gt; clear all cache ids


    Parameters

    • optionalid: string

    Returns Promise<void>

staticclearPendingChanges

  • clearPendingChanges(): Promise<void>
  • Clear the list of pending changes without applying or syncing them.


    Returns Promise<void>

staticgetCacheEntries

  • getCacheEntries(): Observable<string[]>
  • Return the list of cache ids saved in previous execute or observe


    Returns Observable<string[]>

staticgetPendingChanges

  • getPendingChanges(): 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>

staticgetProcessingErrors

  • getProcessingErrors(): Observable<boolean>
  • Return an Observable which emit a new value for each Error encountered when processing data results asynchronously


    Returns Observable<boolean>

staticgetProcessingStatus

  • 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>

statichasPendingChanges

  • hasPendingChanges(): Observable<boolean>
  • Return an observable which gets TRUE if one or more changes must be synced with remoted database


    Returns Observable<boolean>

staticloadPendingChanges

  • loadPendingChanges(data: string): Promise<void>
  • Load the given pending changes into the local offline database


    Parameters

    • data: string

    Returns Promise<void>

staticsynchroniseChanges

  • synchroniseChanges(): 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]>