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