Skip to content

Instantly share code, notes, and snippets.

@alvinsj
Created December 6, 2013 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvinsj/7825952 to your computer and use it in GitHub Desktop.
Save alvinsj/7825952 to your computer and use it in GitHub Desktop.
// Initialization
cacheStore = new CacheStore(getContext()) {
@Override
public String storeName() {
return "ProductsStore";
}
};
// store value
cacheStore.put(TYPE, KEY, VALUE);
// retrieve value
String value = cacheStore.get(TYPE, KEY);
// store object
Cachable cachableObject
cacheStore.put(cachableObject
// retrieve object
cachableObject = null;
cacheStore.getMatched(cachableObject, TYPE, KEY);
cacheStore.getLatest(cachableObject, TYPE, LEY);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment