|
|
| version 1.11, 2003/09/25 09:15:02 | version 1.23, 2020/12/15 17:10:30 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: cache managers center decl. | Parser: cache managers center decl. |
| Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| $Date$ | |
| */ | */ |
| #ifndef PA_CACHE_MANAGERS_H | #ifndef PA_CACHE_MANAGERS_H |
| #define PA_CACHE_MANAGERS_H | #define PA_CACHE_MANAGERS_H |
| static const char* IDENT_CACHE_MANAGERS_H="$Date$"; | #define IDENT_PA_CACHE_MANAGERS_H "$Id$" |
| #include "pa_hash.h" | #include "pa_hash.h" |
| #include "pa_value.h" | #include "pa_value.h" |
| Line 23 public: | Line 21 public: |
| /// if filter_server_id not null, returns status only Cachable -s with matching cacheable_item_server_id() | /// if filter_server_id not null, returns status only Cachable -s with matching cacheable_item_server_id() |
| virtual Value* get_status() =0; | virtual Value* get_status() =0; |
| virtual void maybe_expire_cache() {} | virtual void maybe_expire_cache() {} |
| virtual ~Cache_manager() {} | |
| }; | }; |
| /// maintains name=>Cache_manager association, can expire its contents | /// maintains name=>Cache_manager association, can expire its contents |
| class Cache_managers: public Hash<const String::Body, Cache_manager*> { | class Cache_managers: public HashString<Cache_manager*> { |
| public: | public: |
| Cache_managers(); | |
| virtual ~Cache_managers(); | |
| /// maybe-expires all caches it contains, each cache manager desides it itself | /// maybe-expires all caches it contains, each cache manager desides it itself |
| void maybe_expire(); | void maybe_expire(); |
| }; | }; |
| /// global | /// global |
| extern Cache_managers cache_managers; | extern Cache_managers* cache_managers; |
| #endif | #endif |