--- parser3/src/main/pa_sql_driver_manager.C 2001/11/05 10:21:28 1.49 +++ parser3/src/main/pa_sql_driver_manager.C 2001/11/08 14:47:32 1.52 @@ -2,9 +2,9 @@ Parser: sql driver manager implementation. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + Author: Alexander Petrosyan (http://paf.design.ru) - $Id: pa_sql_driver_manager.C,v 1.49 2001/11/05 10:21:28 paf Exp $ + $Id: pa_sql_driver_manager.C,v 1.52 2001/11/08 14:47:32 paf Exp $ */ #include "pa_sql_driver_manager.h" @@ -88,12 +88,10 @@ static void expire_connections(const Has // SQL_Driver_manager -SQL_Driver_manager::SQL_Driver_manager(Pool& apool) : Pooled(apool), +SQL_Driver_manager::SQL_Driver_manager(Pool& apool) : Cache_manager(apool), driver_cache(apool), connection_cache(apool), prev_expiration_pass_time(0) { - - status_providers->put(*NEW String(pool(), "sql"), this); } SQL_Driver_manager::~SQL_Driver_manager() { @@ -263,8 +261,6 @@ void SQL_Driver_manager::put_driver_to_c SQL_Connection *SQL_Driver_manager::get_connection_from_cache(const String& url) { SYNCHRONIZED; - maybe_expire_connection_cache(); - if(Stack *connections=static_cast(connection_cache.get(url))) while(connections->top_index()>=0) { // there are cached connections to that 'url' SQL_Connection *result=static_cast(connections->pop()); @@ -287,7 +283,7 @@ void SQL_Driver_manager::put_connection_ connections->push(&connection); } -void SQL_Driver_manager::maybe_expire_connection_cache() { +void SQL_Driver_manager::maybe_expire_cache() { time_t now=time(0); if(prev_expiration_pass_time