Holds/manages caching configuration.
Caching strategies
For each subtree, you can set the caching strategy to ‘ALL’, ‘SEEN’ (default), and ‘FLUSH’.
- ’ALL’ means that once all outgoing changes have been pushed, sync will start retrieving nodes to cache pro-actively. If a local copy exists of everything, it will check on each sync whether the ETag of the root folder changed, and retrieve remote changes if they exist.
- ’SEEN’ does this only for documents and folders that have been either read from or written to at least once since connecting to the current remote backend, plus their parent/ancestor folders up to the root (to make tree-based sync possible).
- ’FLUSH’ will only cache outgoing changes, and forget them as soon as they have been saved to remote successfully.
Summary
RemoteStorage.Caching | Holds/manages caching configuration. |
Functions | |
set | Configure caching for a given path explicitly. |
enable | Enable caching for a given path. |
disable | Disable caching for a given path. |
onActivate | Set a callback for when caching is activated for a path. |
checkPath | Retrieve caching setting for a given path, or its next parent with a caching strategy set. |
reset | Reset the state of caching by deleting all caching information. |