diff --git a/lemonldap-ng-common/lemonldap-ng.ini b/lemonldap-ng-common/lemonldap-ng.ini index 41d084583..0d9b20502 100644 --- a/lemonldap-ng-common/lemonldap-ng.ini +++ b/lemonldap-ng-common/lemonldap-ng.ini @@ -79,23 +79,23 @@ dirName=/var/lib/lemonldap-ng/conf # LOCAL CACHE CONFIGURATION # # To increase performances, use a local cache for the configuration. You have -# to choose a Cache::Cache module and set it's parameters (1 line). Example: +# to choose a Cache::Cache module and set its parameters. Example: # # localStorage = Cache::FileCache -# localStorageOptions={ \ -# 'namespace' => 'lemonldap-ng',\ -# 'default_expires_in' => 600, \ -# 'directory_umask' => '007', \ -# 'cache_root' => '/tmp', \ -# 'cache_depth' => 5, \ +# localStorageOptions={ \ +# 'namespace' => 'lemonldap-ng-config',\ +# 'default_expires_in' => 600, \ +# 'directory_umask' => '007', \ +# 'cache_root' => '/tmp', \ +# 'cache_depth' => 0, \ # } localStorage=Cache::FileCache -localStorageOptions={ \ - 'namespace' => 'lemonldap-ng',\ - 'default_expires_in' => 600, \ - 'directory_umask' => '007', \ - 'cache_root' => '/tmp', \ - 'cache_depth' => 5, \ +localStorageOptions={ \ + 'namespace' => 'lemonldap-ng-config',\ + 'default_expires_in' => 600, \ + 'directory_umask' => '007', \ + 'cache_root' => '/tmp', \ + 'cache_depth' => 0, \ } [portal] @@ -209,6 +209,28 @@ localStorageOptions={ \ [handler] +# SESSION CACHE CONFIGURATION +# +# To increase performances, use a local cache for sessions. You have +# to choose a Cache::Cache module and set its parameters. Example: +# +# localStorage = Cache::FileCache +# localStorageOptions={ \ +# 'namespace' => 'lemonldap-ng-sessions',\ +# 'default_expires_in' => 600, \ +# 'directory_umask' => '007', \ +# 'cache_root' => '/tmp', \ +# 'cache_depth' => 3, \ +# } +localStorage=Cache::FileCache +localStorageOptions={ \ + 'namespace' => 'lemonldap-ng-sessions',\ + 'default_expires_in' => 600, \ + 'directory_umask' => '007', \ + 'cache_root' => '/tmp', \ + 'cache_depth' => 3, \ +} + # Set https to 1 if your handler protect a https website (used only for # redirections to the portal) ;https = 0 diff --git a/lemonldap-ng-handler/example/scripts/purgeLocalCache b/lemonldap-ng-handler/example/scripts/purgeLocalCache index 3392ca87f..131bea589 100755 --- a/lemonldap-ng-handler/example/scripts/purgeLocalCache +++ b/lemonldap-ng-handler/example/scripts/purgeLocalCache @@ -19,20 +19,15 @@ my $debug = 0; #============================================================================= my $lmconf = Lemonldap::NG::Common::Conf->new() or die $Lemonldap::NG::Common::Conf::msg; -my $conf = $lmconf->getConf or die "Unable to get configuration ($!)"; -my $localconf = $lmconf->getLocalConf(HANDLERSECTION) +my $conf = $lmconf->getLocalConf(HANDLERSECTION) or die "Unable to get local configuration ($!)"; -if ($localconf) { - $conf->{$_} = $localconf->{$_} foreach ( keys %$localconf ); -} - print "Configuration loaded\n" if $debug; exit 0 unless ( $conf->{localStorage} ); eval "require $conf->{localStorage}"; $conf->{localStorageOptions}->{namespace} ||= "lemonldap"; $conf->{localStorageOptions}->{default_expires_in} ||= 600; my $c = $conf->{localStorage}->new( $conf->{localStorageOptions} ); -$c->Purge(); +$c->purge(); exit 0;