added page caching

This commit is contained in:
JT Smith 2003-06-22 20:18:58 +00:00
parent 5567669b4f
commit 1eb72cc633
6 changed files with 74 additions and 25 deletions

View file

@ -120,6 +120,28 @@ sub countTemplatePositions {
#-------------------------------------------------------------------
=head2 deCache ( [ pageId ] )
Deletes the cached version of a specified page.
=over
=item pageId
The id of the page to decache. Defaults to the current page id.
=back
=cut
sub deCache {
my $cache = WebGUI::Cache->new;
my $pageId = $_[0] || $session{page}{pageId};
$cache->deleteByRegex("m/^page_".$pageId."_\\d+\$/");
}
#-------------------------------------------------------------------
=head2 drawTemplate ( templateId )
Returns an HTML string containing a small representation of the page template.