-
Notifications
You must be signed in to change notification settings - Fork 2
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
Is there a name for this pattern? #5
Comments
What does 1.i.a mean? Why consult the cache at all in this case? I think we mostly need to name 2.ii.a; the rest of it would just be called "caching", i would say. would you keep retrying the failed request to network? |
1.i.a prevents the page being updated with cached data after it's been updated with network data. Yes, it's all caching, but it's a specific pattern where the page makes two requests, allowing cached data to be displayed first and updating with updated data later if needed.
Maybe. |
Ah, ok. So the two requests always go in parallel? Isn't that benefiting very little from having the cache then? Unless the access to the cache is very slow, I would rather do:
That way at least you use the cache to save bandwidth. Maybe I misunderstood? |
That's another option. Although we (Chrome) run into a lot of disk access issues on windows machines. Malware and virus scanners can make the disk slower than the network, so I'd rather race the two. The fetch in step 2 would be via the browser cache, so there'll be bandwidth saving there. |
ok, got it. I don't know of a name for that. Maybe you could label it something along the lines of 'hit pessimism'. You could also call it 'miss hedging' but people will keep asking you who Ms. Hedging is. ;) |
I've thought about this too and would call it something like "cached preview" |
Nice pattern @jakearchibald , I'd also go with |
The Great Cache Race, or Jake's Multicast Request, I like Miss Hedging, but cached preview doesn't really seem to describe the multiple request, miss hedging & updating that's going on. |
eager caching, lazy loading obviously there should be UI feedback like "this is an old version, updating..." edit: sorry for necrobumping. there repos should be archived ... similar projects: https://github.com/topics/offline-first |
If not, we should name it.
The text was updated successfully, but these errors were encountered: