문제

I want to use a fast key-value store on an Android device where the values are image bitmaps. The store should be backed up by disk and provide some caching, minimizing disk IO. Multi-threaded access is desirable, but not required.

I've looked at Java Berkeley DB which appears to meet the requirements. Are there other libraries that perform better? Or does Berkeley DB perform well on the Android platform?

I'm OK with a solution that requires a single key-value pair to reside in memory, but storing the full key-value pair set, might exceed the size of the device's memory.

도움이 되었습니까?

해결책

I would suggest File based memory caching, works well without overloading device memory. No need for any extra stuff, esp DB won't be optimal way for such needs.

here are few libs;
- https://github.com/commonsguy/cwac-cache (deprecated)
- https://github.com/wareninja/generic-store-for-android
p.s. key-value store and handles memory-file based optimized caching

I've been using both of them especially for Image caching, both performing very well so far.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top