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

Support TTL on a per-field basis #23

Open
mattkrick opened this issue Apr 20, 2016 · 1 comment
Open

Support TTL on a per-field basis #23

mattkrick opened this issue Apr 20, 2016 · 1 comment

Comments

@mattkrick
Copy link
Owner

Every prop on the server GraphQL schema should be given a __ttl field that is automatically requested by cashay. When received by the client, an expiresAt field is generated on the parent object and the earliest time trickles up to the parent array and parent query, etc. It's run during the GC cycle, about every 5 mins. Removing it from normalized data, which invalidates the denormalized response and triggers a series of refreshes that only occur during a redux listener call, so thing out of the view stay deleted. That means no unnecessary data is fetched and we can store data in a persisted state. It also fails gradually, so it's "progressive"

CC @wenzowski

@mattkrick mattkrick changed the title Ttl Support TTL on a per-field basis May 26, 2016
@mullender
Copy link

You could take a look at Falcor's expiration implementation ($expires):
https://netflix.github.io/falcor/doc/global.html#Atom

Falcor does a lot of nice things :)

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