Skip to content

Replace the TtlStoreValue type on cached Versions/WellKnown with background refreshes. #6090

@pixlwave

Description

@pixlwave

We've keep tripping over this expiration in different places so it's time to fix it. Some examples have been:

The solution (already been discussed with @bnjbvr a week or two ago) would be to remove TtlStoreValue and it's STALE_THRESHOLD and always return the cached value. Alongside this, we would need a mechanism that would make the relevant API calls in the background, caching any valid responses so that the next read is up to date. These background refreshes should ideally wait until any sync loops are running and up-to-date to avoid slowing down initial syncs and at the very least should be scheduled every time a Client is created (although ideally using something like SyncService::start to schedule the refreshes would help long-lived Clients to stay more up to date as apps get backgrounded and foregrounded).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions