Added a cache disabling config option for developers who are testing

performance.
This commit is contained in:
JT Smith 2005-04-28 22:34:42 +00:00
parent 4b101e3dc9
commit 25319188b0
5 changed files with 22 additions and 2 deletions

View file

@ -1660,7 +1660,17 @@ sub getToolbar {
.cutIcon('func=cut',$self->get("url"))
.copyIcon('func=copy',$self->get("url"));
$toolbar .= shortcutIcon('func=createShortcut',$self->get("url")) unless ($self->get("className") =~ /Shortcut/);
return '<img src="'.$self->getIcon(1).'" border="0" title="'.$self->getName.'" alt="'.$self->getName.'" align="absmiddle">'.$toolbar;
WebGUI::Style::setLink($session{config}{extrasURL}.'/contextMenu/contextMenu.css', {rel=>"stylesheet",type=>"text/css"});
WebGUI::Style::setScript($session{config}{extrasURL}.'/contextMenu/contextMenu.js', {type=>"text/javascript"});
#return '<img src="'.$self->getIcon(1).'" border="0" title="'.$self->getName.'" alt="'.$self->getName.'" align="absmiddle">'.$toolbar;
return '<script type="text/javascript">
var contextMenu = new contextMenu_create("'.$self->getIcon(1).'","'.$self->getId.'","'.$self->getName.'");
contextMenu.addLink("'.$self->getUrl("func=promote").'","Promote");
contextMenu.addLink("'.$self->getUrl("func=demote").'","Demote");
contextMenu.addLink("'.$self->getUrl("func=createShortcut").'","Create Shortcut");
contextMenu.addLink("'.$self->getUrl("func=manageAssets").'","Manage");
contextMenu.draw();
</script>'.$toolbar;
}
#-------------------------------------------------------------------

View file

@ -102,6 +102,7 @@ Retrieve content from the filesystem cache.
=cut
sub get {
return undef if ($session{config}{disableCache});
return $_[0]->{_cache}->get($_[0]->{_key});
}

View file

@ -111,6 +111,7 @@ Retrieve content from the filesystem cache.
=cut
sub get {
return undef if ($session{config}{disableCache});
return $_[0]->{_cache}->get($_[0]->{_key});
}