nytimes / Store

Android Library for Async Data Loading and Caching

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maximum size of memory cache is by default 1

saket opened this issue · comments

MemoryPolicyBuilder defaults to 1 as the max-size. Is this a mistake? Or does this get overridden somewhere else?

True, but when a MemoryPolicy is built with an expiry policy, the max-size defaults to 1 unless specified by the user:

https://github.com/NYTimes/Store/blob/d182147d65df3d9a8e1e0718b84c89ff72838c69/store/src/main/java/com/nytimes/android/external/store3/base/impl/MemoryPolicy.java#L91

That seems like a bug. Want to pr a fix?

Sure. What value should we default to?

@pavlospt offered to get the fix in. If no progress in few days I'll ping you 🙂

Great find btw! I guess I just always set all the policy flags explicitly in personal use.

Hey @digitalbuddha & @Saketme, I opened a PR #328. LMK if this is ok or you need any other modifications!

Oh nice. Thanks @pavlospt!

#328 Merged, closing issue