public interface Cache
Note: The Cache is accessed by multiple threads. You must ensure
your Cache implementation is thread safe when get(String) or set(String, android.graphics.Bitmap) is called.
| Modifier and Type | Field and Description |
|---|---|
static Cache |
NONE
A cache which does not store any values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the cache.
|
void |
clearKeyUri(String keyPrefix)
Remove items whose key is prefixed with
keyPrefix. |
android.graphics.Bitmap |
get(String key)
Retrieve an image for the specified
key or null. |
int |
maxSize()
Returns the maximum size in bytes that the cache can hold.
|
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.
|
static final Cache NONE
android.graphics.Bitmap get(String key)
key or null.void set(String key, android.graphics.Bitmap bitmap)
key.int size()
int maxSize()
void clear()
void clearKeyUri(String keyPrefix)
keyPrefix.Copyright © 2013–2016 Square, Inc.. All rights reserved.