Annotation of parser3/src/include/pa_cache_managers.h, revision 1.3

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.3     ! paf         7:        $Id: pa_cache_managers.h,v 1.2 2001/11/08 14:47:31 paf Exp $
1.1       paf         8: */
                      9: 
                     10: #ifndef PA_CACHE_MANAGERS_H
                     11: #define PA_CACHE_MANAGERS_H
                     12: 
                     13: #include "pa_config_includes.h"
                     14: #include "pa_hash.h"
                     15: #include "pa_value.h"
                     16: 
                     17: // defines
                     18: 
                     19: // forwards
                     20: 
                     21: /// maintains name=>Cache_manager association, can expire its contents
                     22: class Cache_managers : public Hash {
                     23: public:
                     24:        Cache_managers(Pool& apool) : Hash(apool) {
                     25:        }
                     26: 
1.3     ! paf        27:        ~Cache_managers();
        !            28: 
1.1       paf        29:        /// maybe-expires all caches it contains, each cache manager desides it itself
                     30:        void maybe_expire();
                     31: 
                     32: };
                     33: 
                     34: /// can return status and can expire it contents
1.2       paf        35: class Cache_manager : public Pooled {
1.1       paf        36: public:
1.2       paf        37:        Cache_manager(Pool& apool) : Pooled(apool) {}
1.3     ! paf        38:        virtual ~Cache_manager() {}
1.2       paf        39: 
1.1       paf        40:        /// if filter_server_id not null, returns status only Cachable -s with matching cacheable_item_server_id()
                     41:        virtual Value& get_status(Pool& pool, const String *source) =0;
                     42:        virtual void maybe_expire_cache() {}
                     43: };
                     44: 
                     45: /// global
                     46: extern Cache_managers *cache_managers;
                     47: 
                     48: #endif

E-mail: