allow WebGUI::Cache to do more than File, Database
This commit is contained in:
parent
a9578eec2c
commit
8e9dc4823f
1 changed files with 9 additions and 7 deletions
|
|
@ -132,13 +132,15 @@ A subdivider to store this cache under. When building your own cache plug-in def
|
||||||
sub new {
|
sub new {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
if ($session->config->get("cacheType") eq "WebGUI::Cache::Database") {
|
my $type = $session->config->get('cacheType');
|
||||||
require WebGUI::Cache::Database;
|
eval{ WebGUI::Pluggable::load( $type ) };
|
||||||
return WebGUI::Cache::Database->new($session,@_);
|
if ( !$@ && $type->isa( "WebGUI::Cache" ) ) {
|
||||||
} else {
|
return $type->new( $session, @_ );
|
||||||
require WebGUI::Cache::FileCache;
|
}
|
||||||
return WebGUI::Cache::FileCache->new($session,@_);
|
else {
|
||||||
}
|
require WebGUI::Cache::FileCache;
|
||||||
|
return WebGUI::Cache::FileCache->new( $session, @_ );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue