Skip to content

Local client cache implementation #1

@genryxy

Description

@genryxy

We want to get item from local cache for if there is no connection to the service and a required element exists.

If service is available and element exists in the local cache, it is necessary to check that data is not expired (e.g. local timestamp of the document and timestamp of the remote document are the same).
Probably it would be better to check information about specific patterns in the document and update only the patterns which timestamps changed.

If there is no such document in the local cache it is necessary to request this element from the service. If a document was obtained from the service, it should be cached in the local cache.

If cached documents were changed somehow locally and these changes were pushed to the service, it is necessary to delete such document from the local cache (for the first implementation).
It could be enhanced by changing only altered patterns in the document instead of all content of the document.

NOTE: There is no need to validate the local cache very often. A document can be considered fresh it has been updated within the specified time interval (e.g. 1 hour). Immediate update of documents is not critical. It is better to avoid redundant requests to the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions