/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#include "squid.h"
#include "acl/Gadgets.h"
+#include "auth/Config.h"
#include "auth/CredentialsCache.h"
#include "base/RunnersRegistry.h"
#include "Debug.h"
#include "event.h"
-#include "SquidConfig.h"
-#include "SquidTime.h"
namespace Auth {
CredentialsCache::cleanup()
{
// cache entries with expiretime <= expirationTime are to be evicted
- const time_t expirationTime = current_time.tv_sec - ::Config.authenticateTTL;
+ const time_t expirationTime = current_time.tv_sec - Auth::TheConfig.credentialsTtl;
const auto end = store_.end();
for (auto i = store_.begin(); i != end;) {
++i;
}
}
+ gcScheduled_ = false;
scheduleCleanup();
}
if (!gcScheduled_ && store_.size()) {
gcScheduled_ = true;
eventAdd(cacheCleanupEventName, &CredentialsCache::Cleanup,
- this, ::Config.authenticateGCInterval, 1);
+ this, Auth::TheConfig.garbageCollectInterval, 1);
}
}