Remove the incorrect custom MarshalJSON method to avoid infinite recursion (#5624)

This commit is contained in:
Xinzhao Xu
2023-04-07 10:31:34 +08:00
committed by GitHub
parent 39a0d6f84e
commit f59ada60b6

View File

@@ -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
}