|
|
| version 1.7.2.2, 2003/01/28 11:57:03 | version 1.24, 2024/11/04 03:53:25 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: status press center implementation. | Parser: status press center implementation. |
| Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru> |
| */ | */ |
| static const char* IDENT_CACHE_MANAGERS_C="$Date$"; | |
| #include "pa_cache_managers.h" | #include "pa_cache_managers.h" |
| volatile const char * IDENT_PA_CACHE_MANAGERS_C="$Id$" IDENT_PA_CACHE_MANAGERS_H; | |
| #include "pa_sql_driver_manager.h" | |
| #ifdef XML | |
| #include "pa_stylesheet_manager.h" | |
| #endif | |
| // globals | // globals |
| Cache_managers cache_managers; | Cache_managers* cache_managers=0; |
| Cache_managers::Cache_managers() { | |
| put("sql", (SQL_driver_manager=new SQL_Driver_manager)); | |
| #ifdef XML | |
| put("stylesheet", (stylesheet_manager=new Stylesheet_manager)); | |
| #endif | |
| } | |
| static void delete_one(Cache_managers::key_type /*akey*/, Cache_managers::value_type avalue, int) { | |
| delete avalue; | |
| } | |
| Cache_managers::~Cache_managers() { | |
| for_each<int>(delete_one, 0); | |
| } | |
| // methods | // methods |
| static void maybe_expire_one(Cache_managers::key_type akey, Cache_managers::value_type avalue, | static void maybe_expire_one(Cache_managers::key_type /*akey*/, Cache_managers::value_type avalue, int) { |
| int) { | |
| avalue->maybe_expire_cache(); | avalue->maybe_expire_cache(); |
| } | } |
| void Cache_managers::maybe_expire() { | void Cache_managers::maybe_expire() { |
| for_each(maybe_expire_one, 0); | for_each<int>(maybe_expire_one, 0); |
| } | } |