jmdobry / CacheFactory

CacheFactory is a very simple and useful synchronous key-value store for the browser.
http://www.pseudobry.com/CacheFactory
MIT License
30 stars 18 forks source link

After reinitializing a cache from localStorage, info().size returns 0 #1

Closed sloops77 closed 9 years ago

sloops77 commented 9 years ago

if the cache needs to reinitialize from local storage, lets say 10 items: cache.keys().length === 10 but cache.info().size === 0. During setStorageMode the $$lruHeap should be initialized, right?

jmdobry commented 9 years ago

Yes, this is a bug.

sloops77 commented 9 years ago

i can fix it tomorrow if you like and send a pr

jmdobry commented 9 years ago

This is somewhat of an involved fix, because right now the $$exiresHeap isn't getting initialized either. I'm planning to fix it on Saturday when I finally have internet at my house.

sloops77 commented 9 years ago

ok

On 17 Sep 2015, at 22:27, Jason Dobry notifications@github.com wrote:

This is somewhat of an involved fix, because right now the $$exiresHeap isn't getting initialized either. I'm planning to fix it on Saturday when I finally have internet at my house.

— Reply to this email directly or view it on GitHub https://github.com/jmdobry/CacheFactory/issues/1#issuecomment-141197095.