public interface MemoryCache<K,V> extends SubCache<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Cleans the cache, by removing all cache entries
|
CacheEntry<V> |
get(K key)
Get the Cached entry
|
boolean |
isForType(V value)
Determines if the the cache implementation can store values of the given (already parsed) value
|
void |
onLowMemory()
This method is called, when the memory of the device runs low (RAM).
|
void |
put(K key,
CacheEntry<V> entry)
Put a already existing entry in the memory cache
|
void |
put(K key,
V value,
String mimeType,
String charsetEncoding,
long expirationTimeStamp,
String eTag)
Adds and create a new
CacheEntry to the cache. |
remove, updateExpirationTimestampvoid put(K key, V value, String mimeType, String charsetEncoding, long expirationTimeStamp, String eTag)
CacheEntry to the cache.key - The keyvalue - The Value for the given keymimeType - The mime type of the value. This is important to find the
correct parser for the stored cache valuecharsetEncoding - The charset like, UTF-8 etc. that i used, to encode the
string content (is useless for binary data)expirationTimeStamp - The expiration valueeTag - The ETagvoid put(K key, CacheEntry<V> entry)
key - entry - CacheEntry<V> get(K key)
key - boolean isForType(V value)
value - void onLowMemory()
void clear()
Copyright © 2015 Hannes Dorfmann. All rights reserved.