-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Pre-RFC: Automated GC via WeakRef #8162
Comments
Even if we don't add this GC we should probably explore a WeakRef mode whereby a user cache implementation could choose to implement GC |
This seems like a really interesting place to explore and doable?!? Another path could be maintain a strong ref and remove the strong ref when the expiry clocks in. Also this seems really useful.
Seems like a great idea!
One question I have is, say for a list view, if 10 out of the 50 items were GC'ed, what is our recovery strategy for those 10? Recreated means "get from API" right? |
"what is our recovery strategy" I would say it's the same as though they were never loaded before |
this would also allow us to detect when a relationship was no longer "active" and return to a "lazy" mode for it once #8806 is completed |
Now that WeakRef is available in all browsers except Opera, we should explore adding a true GC to EmberData. This would replace the
unloadRecord
andunloadAll
APIs.The mechanics of this would roughly be
The text was updated successfully, but these errors were encountered: