Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Implement caching option in RDS protocol #641

Closed
manugarg opened this issue Jul 28, 2021 · 1 comment
Closed

Implement caching option in RDS protocol #641

manugarg opened this issue Jul 28, 2021 · 1 comment
Assignees
Milestone

Comments

@manugarg
Copy link
Contributor

manugarg commented Jul 28, 2021

Implement caching option in RDS protocol.

RDS client should be able to ask RDS server to return resources only if resources have changed since the provided timestamp.

..Request {
  ...
  optional int64 if-modified-since
}

If RDS provider supports if-modified-since, it will add resources to response only if they have changed since the provided timestamp. Response will also include the last-modified timestamp so that client can verify that server actually supports the if-modified-since option.

..Response {
  ...
  optional int64 last-modified
}

Ref: #634

@manugarg manugarg self-assigned this Jul 28, 2021
manugarg added a commit that referenced this issue Jul 29, 2021
Idea is that client should not need to refresh its cache, or server should not need to resend the same set of resources, if nothing has changed.

We'll use HTTP-like if-modified-since (in request) and last-modified (in response) fields to control cache behavior.

Ref: #641
PiperOrigin-RevId: 387679666
manugarg added a commit that referenced this issue Jul 30, 2021
* Implement caching in RDS protocol.

Idea is that client should not need to refresh its cache, or server should not need to resend the same set of resources, if nothing has changed.

We'll use HTTP-like if-modified-since (in request) and last-modified (in response) fields to control cache behavior.

Ref: #641
PiperOrigin-RevId: 387679666
@manugarg manugarg added this to the v0.11.3 milestone Jul 30, 2021
manugarg added a commit that referenced this issue Aug 3, 2021
If request contains if_modified_since field, use that field to decide whether to send all the resources in the response or not.

We always returns last_modified in the response. This timestamp corresponds to when lister's cache was refreshed from the actual file.

Ref: #641
& #634
PiperOrigin-RevId: 388502695
manugarg added a commit that referenced this issue Aug 3, 2021
If request contains if_modified_since field, use that field to decide whether to send all the resources in the response or not.

We always returns last_modified in the response. This timestamp corresponds to when lister's cache was refreshed from the actual file.

Ref: #641 & #634
PiperOrigin-RevId: 388502695
@manugarg
Copy link
Contributor Author

manugarg commented Aug 3, 2021

This should be done now:

  1. RDS protocol has support for caching now.
  2. RDS file provider supports caching, based on the file's modified_time timestamp.

@manugarg manugarg closed this as completed Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant