Annotation of parser3/src/include/pa_cache_managers.h, revision 1.4
1.1 paf 1: /** @file
2: Parser: cache managers center decl.
3:
4: Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
5: Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru)
6:
1.4 ! paf 7: $Id: pa_cache_managers.h,v 1.3 2001/12/13 11:09:46 paf Exp $
1.1 paf 8: */
9:
10: #ifndef PA_CACHE_MANAGERS_H
11: #define PA_CACHE_MANAGERS_H
12:
13: #include "pa_hash.h"
14: #include "pa_value.h"
15:
16: // defines
17:
18: // forwards
19:
20: /// maintains name=>Cache_manager association, can expire its contents
21: class Cache_managers : public Hash {
22: public:
23: Cache_managers(Pool& apool) : Hash(apool) {
24: }
25:
1.3 paf 26: ~Cache_managers();
27:
1.1 paf 28: /// maybe-expires all caches it contains, each cache manager desides it itself
29: void maybe_expire();
30:
31: };
32:
33: /// can return status and can expire it contents
1.2 paf 34: class Cache_manager : public Pooled {
1.1 paf 35: public:
1.2 paf 36: Cache_manager(Pool& apool) : Pooled(apool) {}
1.3 paf 37: virtual ~Cache_manager() {}
1.2 paf 38:
1.1 paf 39: /// if filter_server_id not null, returns status only Cachable -s with matching cacheable_item_server_id()
40: virtual Value& get_status(Pool& pool, const String *source) =0;
41: virtual void maybe_expire_cache() {}
42: };
43:
44: /// global
45: extern Cache_managers *cache_managers;
46:
47: #endif
E-mail: