fixed: as we have insert_page ezc function now
we cannot delete ezc patterns when PatternCacher::GetPattern() method is called because we can delete a pattern which is in use now deleting is performed at the end of a request git-svn-id: svn://ttmath.org/publicrep/winix/trunk@751 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
13
core/app.cpp
13
core/app.cpp
@@ -143,11 +143,7 @@ bool App::Init()
|
||||
compress.Init();
|
||||
system.Init();
|
||||
functions.Init();
|
||||
|
||||
// init templates after functions are created
|
||||
templates.CreateFunctions(); // create functions first (functions will be cached by patterns)
|
||||
templates.ReadIndexFileNames();
|
||||
templates.ReadTemplates();
|
||||
templates.Init(); // init templates after functions are created
|
||||
|
||||
// init notify after templates (it uses locales from templates)
|
||||
system.notify.ReadTemplates();
|
||||
@@ -237,7 +233,6 @@ void App::ProcessRequest()
|
||||
SaveSessionsIfNeeded(); // !! przerzucic to na watek sesji
|
||||
|
||||
system.load_avg.StopRequest();
|
||||
log << logendrequest;
|
||||
}
|
||||
catch(const std::exception & e)
|
||||
{
|
||||
@@ -259,12 +254,14 @@ void App::ProcessRequest()
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
log << log1 << "App: an exception when clearing the request (from a plugin)" << logend;
|
||||
log << log1 << "App: an exception when clearing after a request (exception from a plugin)" << logend;
|
||||
}
|
||||
|
||||
|
||||
// simple operations which should not throw an exception
|
||||
templates.RequestEnd();
|
||||
cur.request->Clear();
|
||||
cur.session = session_manager.GetTmpSession();
|
||||
log << logendrequest;
|
||||
}
|
||||
|
||||
|
||||
|
16
core/app.h
16
core/app.h
@@ -82,25 +82,17 @@ public:
|
||||
model
|
||||
*/
|
||||
|
||||
// file system
|
||||
// ...
|
||||
System system;
|
||||
|
||||
// functions (ls, cat, emacs, ...)
|
||||
Functions functions;
|
||||
|
||||
// false at the beginning
|
||||
// !! moze to do loggera dac?
|
||||
bool stdout_is_closed;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
controllers
|
||||
(note that the whole app object is actually a controller too)
|
||||
*/
|
||||
|
||||
// functions (ls, cat, emacs, ...)
|
||||
Functions functions;
|
||||
|
||||
|
||||
/*
|
||||
view
|
||||
*/
|
||||
|
@@ -207,6 +207,9 @@ void Config::AssignValues(bool stdout_is_closed)
|
||||
pass_rsa_private_key = Text(L"pass_rsa_private_key");
|
||||
|
||||
opensll_path = Text(L"opensll_path", L"/usr/bin/openssl");
|
||||
|
||||
pattern_cacher_when_delete = Size(L"pattern_cacher_when_delete", 130);
|
||||
pattern_cacher_how_many_delete = Size(L"pattern_cacher_how_many_delete", 30);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -378,11 +378,18 @@ public:
|
||||
// !! once you set these keys don't change it any more (people wouldn't be allowed to login)
|
||||
std::wstring pass_rsa_private_key;
|
||||
|
||||
|
||||
// path to 'openssl'
|
||||
// default: /usr/bin/openssl
|
||||
std::wstring opensll_path;
|
||||
|
||||
// setting when we should delete patterns (EZC patterns)
|
||||
// we are deleting when we have more (or equal) patterns than 'when_delete'
|
||||
// and then we are deleting 'how_many_del' patterns
|
||||
// those patterns comes from items (pages) with executable bit set
|
||||
size_t pattern_cacher_when_delete;
|
||||
size_t pattern_cacher_how_many_delete;
|
||||
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user