01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.cache;
11:
12: /**
13: * Cache for queries like SELECT COUNT(number) AS number FROM mm_news news.
14: *
15: * @author Michiel Meeuwissen
16: * @version $Id: AggregatedResultCache.java,v 1.3 2005/01/30 16:46:37 nico Exp $
17: * @see org.mmbase.bridge.implementation.BasicCloud#getList
18: * @todo It is odd that this query cache is called in the bridge implementation and not in the core.
19: * @since MMBase-1.7
20: */
21: public class AggregatedResultCache extends QueryResultCache {
22:
23: // There will be only one multilevel cache, and here it is:
24: private static AggregatedResultCache cache;
25:
26: public static AggregatedResultCache getCache() {
27: return cache;
28: }
29:
30: static {
31: cache = new AggregatedResultCache(300);
32: cache.putCache();
33: }
34:
35: public String getName() {
36: return "AggregatedResultCache";
37: }
38:
39: public String getDescription() {
40: return "Aggregating Query Results";
41: }
42:
43: /**
44: * Creates the cache.
45: */
46: private AggregatedResultCache(int size) {
47: super(size);
48: }
49:
50: }
|