-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Can I explicitly trigger Siesta's low memory cleanup? #179
Comments
This is the perpetual problem with memory cleanup events — and with Siesta does internally listen for a I’d consider exposing a |
I punted on this problem and just stopped caching data not on the screen. 😞 This makes my VC a bit slower to draw than I like, but doesn't actually cause any additional network requests. Having access to something like a |
It’s a reasonable request, and easy enough to implement. We’ll need to give a little thought to what it should be called, whether it should be global or per service, and whether it exposes anything it shouldn’t. |
I have an issue where I'm caching data that I've collected from two different sources, Siesta being one of them. That model class contains Resources which it is observing. When a low memory warning comes in, I release all my cached data which is currently not on the screen. However, I've found that there's no guarantee that my class's response to low memory happens before Siesta's, so the fact that my class was observing some Resources prevents Siesta from flushing its cached data.
The simplest thing for me to do would be to clean up my cache, then call Siesta's cleanup. Is that a reasonable approach, and if so, does Siesta allow it? I would otherwise have to reengineer my handling of Resources in order to toggle their observation state based on whether the user was looking at that data or not. I'd prefer to keep things simple and handle the unusual low memory case separately, if possible.
let me know what I can do, I'm still loving Siesta!
Jordan
The text was updated successfully, but these errors were encountered: