{"modulePath":"github.com/speakeasy-api/openapi","version":"v1.28.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cache\n\n## Functions\n\n```go\nfunc ClearAllCaches()\n```\nClearAllCaches clears all global caches in the system. This includes: - URL parsing cache (internal/utils) - Reference resolution cache (references) - Field mapping cache (marshaller)\n\nThis function is thread-safe and can be called from multiple goroutines. It's particularly useful for: - Testing scenarios where clean state is needed - Memory management when caches are no longer needed - Development/debugging when cache invalidation is required\n\n```go\nfunc ClearFieldCache()\n```\nClearFieldCache clears the global field mapping cache. This cache stores pre-computed field maps for struct types to avoid expensive reflection operations during unmarshalling.\n\n```go\nfunc ClearReferenceCache()\n```\nClearReferenceCache clears the global reference resolution cache. This cache stores resolved reference results to avoid repeated resolution of the same (reference, target) pairs.\n\n```go\nfunc ClearURLCache()\n```\nClearURLCache clears the global URL parsing cache. This cache stores parsed URL objects to avoid repeated parsing of the same URLs.\n\n## Types\n\n```go\ntype CacheStats struct {\n\tURLCacheSize       int64\n\tReferenceCacheSize int64\n\tFieldCacheSize     int64\n}\n```\nGetCacheStats returns statistics about all global caches\n\n```go\nfunc GetAllCacheStats() CacheStats\n```\nGetAllCacheStats returns statistics about all global caches in the system\n\n```go\ntype Manager struct{}\n```\nManager provides centralized cache management for all global caches in the system\n\n","path":"github.com/speakeasy-api/openapi/cache","name":"cache","synopsis":"","isRedistributable":true}
