MCPcopy Index your code
hub / github.com/EverythingSuckz/TG-FileStreamBot / InitCache

Function InitCache

internal/cache/cache.go:22–29  ·  view source on GitHub ↗
(log *zap.Logger)

Source from the content-addressed store, hash-verified

20}
21
22func InitCache(log *zap.Logger) {
23 log = log.Named("cache")
24 gob.Register(types.File{})
25 gob.Register(tg.InputDocumentFileLocation{})
26 gob.Register(tg.InputPhotoFileLocation{})
27 defer log.Sugar().Info("Initialized")
28 cache = &Cache{cache: freecache.NewCache(10 * 1024 * 1024), log: log}
29}
30
31func GetCache() *Cache {
32 return cache

Callers 1

runAppFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected