changed: updated to the new ezc api, this with O(1) when looking for a specific ezc function

changed: sessions are deleted at the end of a request (and only a few sessions)
         other sessions will be deleted after a next request


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@684 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-11-25 22:42:24 +00:00
parent 933c8841ff
commit 08e53919e2
25 changed files with 753 additions and 634 deletions

View File

@@ -150,9 +150,10 @@ bool App::Init()
// init templates after functions are created
templates.CreateFunctions(); // create functions first (functions will be cached by patterns)
templates.ReadIndexFileNames();
templates.ReadTemplates();
templates.CreateFunctions();
session_manager.LoadSessions();
plugin.Call(WINIX_PLUGIN_INIT);
@@ -213,8 +214,9 @@ void App::ProcessRequestThrow()
// and then BaseUrlRedirect() will be called (for performance)
if( !BaseUrlRedirect() )
{
session_manager.DeleteOldSessions();
session_manager.SetSession(); // set request.session as well
// !! dac zeby zwracalo wskaznik (zawsze prawidlowy) na sesje
// i tutaj przypisanie do request.session
// !! tutaj dodac to ustawianie request.session
@@ -227,6 +229,10 @@ void App::ProcessRequestThrow()
SendAnswer();
notify.ItemChanged(request.notify_code);
// it's better to remove sessions at the end of a request
// as it can take a little time
session_manager.DeleteOldSessions();
}
@@ -258,6 +264,8 @@ void App::Start()
if( was_stop_signal )
break;
// !! tu bedzie lock.WorkStart()
system.load_avg.StartRequest();
log << log2 << config.log_delimiter << logend;
@@ -270,6 +278,8 @@ void App::Start()
request.Clear();
system.load_avg.StopRequest();
log << logsave;
// !! tu bedzie lock.WorkStop();
}
}
@@ -323,6 +333,7 @@ bool sent = false;
// zmienic nazwe np na ProcessRequest
// !! ta nazwa chyba juz zajeta...
void App::Make()
{
if( request.dir_tab.empty() )