Discover Packages
github.com/Egham-7/adaptive-proxy
internal
utils
clientcache
package
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Oct 23, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Cache[T any ] struct {
}
Cache provides a type-safe client cache with singleflight to prevent duplicate creation
NewCache creates a new type-safe client cache
func (c *Cache [T]) Clear()
Clear removes all clients from the cache
Delete removes a client from the cache
GetOrCreate retrieves a cached client or creates a new one using the provided factory function
The factory is only called once per key, even under concurrent load
Source Files
¶
Click to show internal directories.
Click to hide internal directories.