]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Implemented ACL cached match flush upon riconfigure on UserNameCache
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 3 Sep 2015 12:57:37 +0000 (14:57 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 3 Sep 2015 12:57:37 +0000 (14:57 +0200)
src/auth/User.cc
src/auth/UserNameCache.cc
src/auth/UserNameCache.h

index 1c6cef3c00ea4aa54068f1a4129942cf01812fc9..261ab025ed0e88658d26250f4c1032530f1bf418 100644 (file)
@@ -168,6 +168,8 @@ Auth::User::CachedACLsReset()
         aclCacheMatchFlush(&auth_user->proxy_match_cache);
     }
 
+    //new-style moved to UserNameCache::syncConfig()
+
     debugs(29, 3, HERE << "Finished.");
 }
 
index e21a29c8732a5bc32ec44ea43503fb23f9e7a6a7..03767fd5fc7b3b5e30b90e8fd512ef9b4186e5c6 100644 (file)
@@ -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 */
index 5409abcfbd6af38228cab312715c4f5dc2b10a26..63e12b6a499ae795c7f3babde0ba435cc5f4d9c2 100644 (file)
@@ -64,6 +64,7 @@ public:
 
     /// RegisteredRunner API
     virtual void endingShutdown() override;
+    virtual void syncConfig() override;
 
 private:
     StoreType store_;