MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / InMemoryCache

Method InMemoryCache

api/pkg/di/container.go:433–441  ·  view source on GitHub ↗

InMemoryCache returns the shared in-memory cache.Cache, creating it on the first call.

()

Source from the content-addressed store, hash-verified

431
432// InMemoryCache returns the shared in-memory cache.Cache, creating it on the first call.
433func (container *Container) InMemoryCache() cache.Cache {
434 if container.inMemoryCache != nil {
435 return container.inMemoryCache
436 }
437 container.logger.Debug("creating an in memory cache")
438 c := ttlCache.New(time.Hour, time.Hour*2)
439 container.inMemoryCache = cache.NewMemoryCache(container.Tracer(), c)
440 return container.inMemoryCache
441}
442
443// Cache creates a new instance of cache.Cache
444func (container *Container) Cache() cache.Cache {

Callers 1

BillingServiceMethod · 0.95

Calls 2

TracerMethod · 0.95
DebugMethod · 0.65

Tested by

no test coverage detected