summaryrefslogtreecommitdiff
path: root/internal/jsonstruct/struct.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/jsonstruct/struct.go')
-rw-r--r--internal/jsonstruct/struct.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/jsonstruct/struct.go b/internal/jsonstruct/struct.go
index 830dc80..16c45de 100644
--- a/internal/jsonstruct/struct.go
+++ b/internal/jsonstruct/struct.go
@@ -37,6 +37,10 @@ func IndexStruct(typ reflect.Type) StructIndex {
return ret
}
+func ClearCache() {
+ structIndexCache = typedsync.CacheMap[reflect.Type, StructIndex]{}
+}
+
// indexStructReal is like indexStruct, but is the real indexer,
// bypassing the cache.
func indexStructReal(typ reflect.Type) StructIndex {