/** * Instructs Cayenne to look for query results in the "shared" cache when * running the query. This is a short-hand notation for: * * <pre> * query.cacheStrategy(QueryCacheStrategy.SHARED_CACHE); * </pre> */ public SQLSelect<T> sharedCache() { return cacheStrategy(QueryCacheStrategy.SHARED_CACHE); }
/** * Instructs Cayenne to look for query results in the "shared" cache when * running the query. This is a short-hand notation for: * * <pre> * query.cacheStrategy(QueryCacheStrategy.SHARED_CACHE, cacheGroup); * </pre> */ public SQLSelect<T> sharedCache(String cacheGroup) { return cacheStrategy(QueryCacheStrategy.SHARED_CACHE, cacheGroup); }
/** * Instructs Cayenne to look for query results in the "local" cache when * running the query. This is a short-hand notation for: * * <pre> * query.cacheStrategy(QueryCacheStrategy.LOCAL_CACHE); * </pre> */ public SQLSelect<T> localCache() { return cacheStrategy(QueryCacheStrategy.LOCAL_CACHE); }
/** * Instructs Cayenne to look for query results in the "local" cache when * running the query. This is a short-hand notation for: * * <pre> * query.cacheStrategy(QueryCacheStrategy.LOCAL_CACHE, cacheGroup); * </pre> */ public SQLSelect<T> localCache(String cacheGroup) { return cacheStrategy(QueryCacheStrategy.LOCAL_CACHE, cacheGroup); }
public SQLSelect<T> cacheStrategy(QueryCacheStrategy strategy, String cacheGroup) { return cacheStrategy(strategy).cacheGroup(cacheGroup); }