|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javalite.activejdbc.cache.QueryCache
public class QueryCache
This is a main cache facade. It could be architected in the future to add more cache implementations besides OSCache.
| Method Summary | |
|---|---|
void |
addItem(String tableName,
String query,
Object[] params,
Object cache)
Adds an item to cache. |
CacheManager |
getCacheManager()
|
Object |
getItem(String tableName,
String query,
Object[] params)
Returns an item from cache, or null if nothing found. |
static QueryCache |
instance()
This class is a singleton, get an instance with this method. |
void |
purgeTableCache(String tableName)
This method purges (removes) all caches associated with a table, if caching is enabled and a corresponding model is marked cached. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static QueryCache instance()
public void addItem(String tableName,
String query,
Object[] params,
Object cache)
tableName - - name of table.query - query textparams - - list of parameters for a query.cache - object to cache.
public Object getItem(String tableName,
String query,
Object[] params)
tableName - name of table.query - query text.params - list of query parameters, can be null if no parameters are provided.
public void purgeTableCache(String tableName)
tableName - table name whose caches are to be purged.public CacheManager getCacheManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||