From f59ada60b61da0db5879d09097fc0f2c74a2d4db Mon Sep 17 00:00:00 2001 From: Xinzhao Xu Date: Fri, 7 Apr 2023 10:31:34 +0800 Subject: [PATCH] Remove the incorrect custom MarshalJSON method to avoid infinite recursion (#5624) --- pkg/simple/client/cache/cache.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/simple/client/cache/cache.go b/pkg/simple/client/cache/cache.go index 2c1235009..374f6c0fb 100644 --- a/pkg/simple/client/cache/cache.go +++ b/pkg/simple/client/cache/cache.go @@ -17,7 +17,6 @@ limitations under the License. package cache import ( - "encoding/json" "fmt" "time" @@ -54,12 +53,6 @@ type Interface interface { // For InMemoryCache, options key can be "cleanupperiod" type DynamicOptions map[string]interface{} -func (o DynamicOptions) MarshalJSON() ([]byte, error) { - - data, err := json.Marshal(o) - return data, err -} - func RegisterCacheFactory(factory CacheFactory) { cacheFactories[factory.Type()] = factory }