--- parser3/src/include/pa_cache_managers.h 2002/08/01 11:41:14 1.8 +++ parser3/src/include/pa_cache_managers.h 2017/02/07 22:00:31 1.22 @@ -1,49 +1,41 @@ /** @file Parser: cache managers center decl. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - - $Date: 2002/08/01 11:41:14 $ */ #ifndef PA_CACHE_MANAGERS_H #define PA_CACHE_MANAGERS_H -static const char* IDENT_CACHE_MANAGERS_H="$Date: 2002/08/01 11:41:14 $"; +#define IDENT_PA_CACHE_MANAGERS_H "$Id: pa_cache_managers.h,v 1.22 2017/02/07 22:00:31 moko Exp $" #include "pa_hash.h" #include "pa_value.h" // defines -// forwards +/// can return status and can expire it contents +class Cache_manager: public PA_Object { +public: + /// if filter_server_id not null, returns status only Cachable -s with matching cacheable_item_server_id() + virtual Value* get_status() =0; + virtual void maybe_expire_cache() {} + virtual ~Cache_manager() {} +}; /// maintains name=>Cache_manager association, can expire its contents -class Cache_managers : public Hash { +class Cache_managers: public HashString { public: - Cache_managers(Pool& apool) : Hash(apool) { - } - - ~Cache_managers(); + Cache_managers(); + virtual ~Cache_managers(); /// maybe-expires all caches it contains, each cache manager desides it itself void maybe_expire(); }; -/// can return status and can expire it contents -class Cache_manager : public Pooled { -public: - Cache_manager(Pool& apool) : Pooled(apool) {} - virtual ~Cache_manager() {} - - /// if filter_server_id not null, returns status only Cachable -s with matching cacheable_item_server_id() - virtual Value& get_status(Pool& pool, const String *source) =0; - virtual void maybe_expire_cache() {} -}; - /// global -extern Cache_managers *cache_managers; +extern Cache_managers* cache_managers; #endif