From: Francesco Chemolli Date: Thu, 3 Sep 2015 12:57:37 +0000 (+0200) Subject: Implemented ACL cached match flush upon riconfigure on UserNameCache X-Git-Tag: SQUID_4_0_1~21^2~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d011742adae0fbd9b19bd72857d0264b7ba3431a;p=thirdparty%2Fsquid.git Implemented ACL cached match flush upon riconfigure on UserNameCache --- diff --git a/src/auth/User.cc b/src/auth/User.cc index 1c6cef3c00..261ab025ed 100644 --- a/src/auth/User.cc +++ b/src/auth/User.cc @@ -168,6 +168,8 @@ Auth::User::CachedACLsReset() aclCacheMatchFlush(&auth_user->proxy_match_cache); } + //new-style moved to UserNameCache::syncConfig() + debugs(29, 3, HERE << "Finished."); } diff --git a/src/auth/UserNameCache.cc b/src/auth/UserNameCache.cc index e21a29c873..03767fd5fc 100644 --- a/src/auth/UserNameCache.cc +++ b/src/auth/UserNameCache.cc @@ -7,11 +7,12 @@ */ #include "squid.h" +#include "auth/UserNameCache.h" +#include "acl/Gadgets.h" //for aclCacheMatchFlush #include "Debug.h" #include "event.h" #include "SquidConfig.h" #include "SquidTime.h" -#include "auth/UserNameCache.h" namespace Auth { @@ -81,4 +82,12 @@ UserNameCache::endingShutdown() reset(); } +void +UserNameCache::syncConfig() +{ + for (auto i : store_) { + aclCacheMatchFlush(&i.second->proxy_match_cache); //flush + } +} + } /* namespace Auth */ diff --git a/src/auth/UserNameCache.h b/src/auth/UserNameCache.h index 5409abcfbd..63e12b6a49 100644 --- a/src/auth/UserNameCache.h +++ b/src/auth/UserNameCache.h @@ -64,6 +64,7 @@ public: /// RegisteredRunner API virtual void endingShutdown() override; + virtual void syncConfig() override; private: StoreType store_;