Skip to content

Ufkoku/SizeBasedEnhancedLruCache

Repository files navigation

Lib overrides android.support.v4.util.LruCache and uses code from article to measure size of objects in heap.

repositories {
    maven { url 'https://dl.bintray.com/ufkoku/maven/' }
}

dependencies {
    compile 'com.ufkoku.cache:lru_cache:1.0.0'
    //or
    compile ('com.ufkoku.cache:lru_cache:1.0.0@aar'){
        transitive = true
    }
}

Usage:

SizeBasedEnhancedLruCache<String, Object> cache = new SizeBasedEnhancedLruCache<>(sizeInBytes);

About

LruCache that uses object size in heap, as sizeOf value.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages