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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user