Annotation of parser3/src/include/pa_cache_managers.h, revision 1.10
1.1 paf 1: /** @file
2: Parser: cache managers center decl.
3:
1.10 ! 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.10 ! paf 7: $Date: 2003/03/24 13:43:41 $
1.1 paf 8: */
9:
10: #ifndef PA_CACHE_MANAGERS_H
11: #define PA_CACHE_MANAGERS_H
1.7 paf 12:
1.10 ! paf 13: static const char* IDENT_CACHE_MANAGERS_H="$Date: 2003/03/24 13:43:41 $";
1.1 paf 14:
15: #include "pa_hash.h"
16: #include "pa_value.h"
17:
18: // defines
19:
1.10 ! paf 20: /// can return status and can expire it contents
! 21: class Cache_manager: public PA_Object {
! 22: public:
! 23: /// if filter_server_id not null, returns status only Cachable -s with matching cacheable_item_server_id()
! 24: virtual Value* get_status() =0;
! 25: virtual void maybe_expire_cache() {}
! 26: };
1.1 paf 27:
28: /// maintains name=>Cache_manager association, can expire its contents
1.10 ! paf 29: class Cache_managers: public Hash<const StringBody, Cache_manager*> {
1.1 paf 30: public:
31: /// maybe-expires all caches it contains, each cache manager desides it itself
32: void maybe_expire();
33:
34: };
35:
36: /// global
1.10 ! paf 37: extern Cache_managers cache_managers;
1.1 paf 38:
39: #endif
E-mail: