Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 553 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 553 Bytes

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);