Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For TTL, is it set at the type level or field level? #66

Open
Sumu-Ning opened this issue May 19, 2023 · 3 comments
Open

For TTL, is it set at the type level or field level? #66

Sumu-Ning opened this issue May 19, 2023 · 3 comments

Comments

@Sumu-Ning
Copy link

If I have a type, with fields: id, fieldA and fieldB, assume the TTL is 10 seconds.

Assume I cached fieldA at time 5s, and cached fieldB at time 10s. If I request fieldA again at time 16s, will it hit cache or do a network call?

Thank you!

@danReynolds
Copy link
Collaborator

Yea the second write would renew the TTL for the entity so the read wouldn't hit the network

@Sumu-Ning
Copy link
Author

Thank you for the quick feedback!

Will it be possible to add the (optional) ttl at the field level? As described before, the data in fieldA might already become stale, even though the whole object gets renewed.

@danReynolds
Copy link
Collaborator

Hey! Just got back from vacation. I don't think field level TTLs are going to be supported for now, it should be possible but would be a sizable feature and I'm not planning to take that on at the moment. Thanks for the inquiry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants