| Constructor and Description |
|---|
LruCache(android.content.Context context)
Create a cache using an appropriate portion of the available RAM as the maximum size.
|
LruCache(int maxSize)
Create a cache with a given maximum size in bytes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the cache.
|
void |
clearKeyUri(String uri)
Remove items whose key is prefixed with
keyPrefix. |
void |
evictAll()
Clear the cache.
|
int |
evictionCount()
Returns the number of values that have been evicted.
|
android.graphics.Bitmap |
get(String key)
Retrieve an image for the specified
key or null. |
int |
hitCount()
Returns the number of times
get(java.lang.String) returned a value. |
int |
maxSize()
Returns the maximum size in bytes that the cache can hold.
|
int |
missCount()
Returns the number of times
get(java.lang.String) returned null. |
int |
putCount()
Returns the number of times
set(String, Bitmap) was called. |
void |
set(String key,
android.graphics.Bitmap bitmap)
Store an image in the cache for the specified
key. |
int |
size()
Returns the current size of the cache in bytes.
|
public LruCache(android.content.Context context)
public LruCache(int maxSize)
public android.graphics.Bitmap get(String key)
Cachekey or null.public void set(String key, android.graphics.Bitmap bitmap)
Cachekey.public final void evictAll()
public final int size()
Cachepublic final int maxSize()
Cachepublic final void clear()
Cachepublic final void clearKeyUri(String uri)
CachekeyPrefix.clearKeyUri in interface Cachepublic final int hitCount()
get(java.lang.String) returned a value.public final int missCount()
get(java.lang.String) returned null.public final int putCount()
set(String, Bitmap) was called.public final int evictionCount()
Copyright © 2013–2016 Square, Inc.. All rights reserved.