-
Notifications
You must be signed in to change notification settings - Fork 305
Is there a way to only clear memory cache? #320
Comments
Currently no, but we are actively looking into a solution to allow this, whether automated via ComponentCallbacks2 or manual. We will keep you posted! 🙂 |
Cool, thanks! |
I think |
I think we should label as bug |
There is an open PR for this #322 |
That pr is not related to clearing more. Clear memory was Deprecated because clear now clears only memory unless you have a Persister that implements Clearable. Pls use clear as though it is clear memory. |
@digitalbuddha but what if I only want to clear memory and not disk even if I have a Clearable persister? |
Could you kindly give a use case for wanting to clear memory and not disk sometimes but wanting to clear memory and disk other times for same store. |
The same thing I mentioned in my original post. If I receive a callback from the system that the phone is running low on memory ( |
open to a pr if you'd like, I'm not crazy about it but will take the contribution if someone else wants to do the work :-) |
If I'm not wrong, there is no way to clear only the memory cache.
clearMemory()
is deprecated so this looks like an intentional behavior. I was hoping to clear my memory cache whenComponentCallbacks2#onTrimMemory()
gets called. Is there any way to do this?The text was updated successfully, but these errors were encountered: