Skip to content
Adamki11s edited this page Jan 29, 2012 · 1 revision

< Home

Sync Cache provides a nice and simple way to temporarily store data.

First you need to create the cache object which takes no parameters.

SyncCache cache = new SyncCache();

From here you can now use the cache object to add, remove and edit data in the cache using the following methods.

void cache.add(String tag, Object object);
void cache.remove(String tag);
void cache.edit(String tag, Object newObject);
boolean cache.exists(String tag);
void cache.erase();

You can easily retrieve the data from the cache by either using the method.

Object cache.getObject(String tag);

Or you can use the other methods which parse the object in the cache and return booleans, integers, floats, Strings etc.