[BUG] [Ruby Client] Incorrect max. age on client-side cache
Open
Nobody has claimed this yet.
area/ruby-client
kind/bug
priority/medium
- Dominant language
- Java
- Stars
- 72
- Forks
- 69
- Avg merge
- 23h 32m
- Merged PRs (30d)
- 4
Description
Describe the bug
The Ruby client does not use Singleton service's max age on client-side cached data that originated from Singelton service.
To Reproduce
Steps to reproduce the behavior:
- Run a sample Ruby application that uses the Singleton Ruby client library.
- Trigger an action that sends a request to the Singleton service to fetch data and load data in cache.
- Notice that the server-side max-age is not used.
Expected behavior
| Case # | Mode | Max. age configured in service?(HTTP response’s Cache-control: max-age) | Max. age configured in client config file? | Which max-age to use? | Notes |
|---|---|---|---|---|---|
| 1 | Online | Y | N | Service | This should be the basic online-mode behavior. |
| 2 | Online | Y | Y | Client | Client may optionally override service’s max-age in online mode. This use case is for flexibility* only. |
| 3 | Online | N | Y/N | N/A | Invalid use case because the VIP service must always set the Cache-Control max-age in the http response. If not set, then it is a bug in VIP service that must be fixed. If this happens, client-side must handle the error by not caching the data (as if the response header is Cache-control: no-cache). Reference: rfc7234-4.2.2 |
| 4 | Offline | - | Y | Client | The client-configured max age is required in offline mode.There is no request to service so always use the client-configured max age. |
| 5 | Offline | - | N | N/A | The client-configured max age is required in offline mode.The client library will throw an exception/error. In this scenario. |
Additional context
Cache Expiration Logic
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.