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

@@ -17,9 +17,16 @@ PatternCacher::PatternCacher()
// !! tymczasowe wartosci dla testow
when_delete_patterns = 3; // 130
how_many_delete = 2; // 30
ezc_fun = 0;
}
void PatternCacher::SetEzcFunctions(TemplatesFunctions::EzcFun * fun)
{
ezc_fun = fun;
}
void PatternCacher::CheckTableSize()
{
@@ -52,11 +59,13 @@ void PatternCacher::CheckTableSize()
}
void PatternCacher::CreatePattern(const Item & item, Ezc::Pattern & pattern)
{
pattern.AllowInclude(false);
pattern.ParseString(item.content);
if( ezc_fun )
pattern.CacheFunctions(*ezc_fun);
}
@@ -100,6 +109,8 @@ PatternTab::iterator i;
void PatternCacher::UpdatePattern(const Item & item)
{
PatternTab::iterator i;
@@ -108,7 +119,7 @@ PatternTab::iterator i;
if( i == pattern_tab.end() )
{
log << log2 << "PC: there is no such an item to update, id: " << item.id << ", url: " << item.url << logend;
//log << log2 << "PC: there is no such an item to update, id: " << item.id << ", url: " << item.url << logend;
return;
}