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

@ -35,6 +35,8 @@
- Added missing international entries for Navigation.
- fix [1177858] lib/WebGUI/i18n/English/Macros.pm can not translated
- Added the notion of utility assets and moved the Template asset into it.
- Added a cache disabling config option for developers who are testing
performance.
- fix [ 1190834 ] Pagination of event calendar does not work for firefox

View file

@ -36,10 +36,16 @@ uploadsPath = /data/WebGUI/www/uploads
# Support for the memcached distributed caching system.
# See http://www.danga.com/memcached/ for details on memcached.
# Uncomment this and point it to your memcached server(s).
# Uncomment this and point it to your memcached server(s). Use a
# comma seperated list for multiple servers.
# memcached_servers = 10.0.0.6:11211
# Set this to 1 to disable WebGUI's caching subsystems. This is
# mainly useful for developers.
disableCache = 0
# The database connection string. It usually takes the form of
# DBI:<driver>:<db>;host=<hostname>

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});
}