From 1b1cb88f144468165e1778d71a311a7af2fb2e87 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Wed, 5 May 2010 16:40:23 +0000 Subject: [PATCH] Local macros (Closes: #57) --- .../lib/Lemonldap/NG/Handler/Simple.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm index 3464e6690..4fe88bc70 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm @@ -1044,9 +1044,16 @@ sub run ($$) { $class->lmSetApacheUser( $apacheRequest, $datas->{$whatToTrace} ); # AUTHORIZATION + my $kc = keys %$datas; return $class->forbidden($uri) unless ( $class->grant($uri) ); $class->updateStatus( $datas->{$whatToTrace}, $apacheRequest->uri, 'OK' ); + # Store local macros + if ( keys %$datas > $kc and $refLocalStorage ) { + $class->lmLog("Update local cache","debug"); + $refLocalStorage->set( $id, $datas, "10 minutes" ); + } + # ACCOUNTING # 2 - Inform remote application $class->sendHeaders;