fix [ 1201650 ] Server-wide Cache can be viewed/cleared by an admin

This commit is contained in:
JT Smith 2005-05-20 19:20:12 +00:00
parent 0d8540bb02
commit 18ae37a518
2 changed files with 7 additions and 2 deletions

View file

@ -32,7 +32,7 @@
- fix [ 1198695 ] 6.6 ß - Can't call method error on ratings.
- fix [ 1204123 ] Bug: sortby.lastreply.url
- fix [ 1203779 ] "Remove" Button in FileUploadControl not internationalized
- fix [ 1201650 ] Server-wide Cache can be viewed/cleared by an admin
6.6.0
- Added a shopping cart system and salable products management system. This

View file

@ -90,7 +90,11 @@ Remove all objects from the filecache system.
sub flush {
my $self = shift;
$self->SUPER::flush();
return $self->{_cache}->Clear;
foreach my $namespace ($self->{_cache}->get_namespaces) {
next if ($namespace =~ /\.conf$/ && $namespace ne $session{config}{configFile});
$self->{_cache}->set_namespace($namespace);
$self->{_cache}->clear;
}
}
#-------------------------------------------------------------------
@ -206,6 +210,7 @@ sub stats {
my $output;
$output = "Total size of file cache: ".$self->{_cache}->Size()." bytes\n";
foreach my $namespace ($self->{_cache}->get_namespaces) {
next if ($namespace =~ /\.conf$/ && $namespace ne $session{config}{configFile});
$self->{_cache}->set_namespace($namespace);
$output .= "\t$namespace : ".($self->{_cache}->get_keys).
" items / ".$self->{_cache}->size()." bytes\n";