From 5fd0f3c9651252c8703086aa7d0883ab10078ed7 Mon Sep 17 00:00:00 2001 From: Abhishek Kondur Date: Thu, 23 Nov 2023 08:53:41 +0400 Subject: [PATCH] disable clear cache hook --- pro/initialize.go | 1 + pro/license.go | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pro/initialize.go b/pro/initialize.go index 46076ef2..13346a9e 100644 --- a/pro/initialize.go +++ b/pro/initialize.go @@ -30,6 +30,7 @@ func InitPro() { ) logic.EnterpriseCheckFuncs = append(logic.EnterpriseCheckFuncs, func() { // == License Handling == + ClearLicenseCache() if err := ValidateLicense(); err != nil { slog.Error(err.Error()) return diff --git a/pro/license.go b/pro/license.go index 8ffd2639..de04f902 100644 --- a/pro/license.go +++ b/pro/license.go @@ -38,10 +38,10 @@ func AddLicenseHooks() { Hook: ValidateLicense, Interval: time.Hour, } - logic.HookManagerCh <- models.HookDetails{ - Hook: ClearLicenseCache, - Interval: time.Hour, - } + // logic.HookManagerCh <- models.HookDetails{ + // Hook: ClearLicenseCache, + // Interval: time.Hour, + // } } // ValidateLicense - the initial and periodic license check for netmaker server