MCPcopy
hub / github.com/usememos/memos / DefaultConfig

Function DefaultConfig

store/cache/cache.go:57–64  ·  view source on GitHub ↗

DefaultConfig returns a default configuration for the cache.

()

Source from the content-addressed store, hash-verified

55
56// DefaultConfig returns a default configuration for the cache.
57func DefaultConfig() Config {
58 return Config{
59 DefaultTTL: 10 * time.Minute,
60 CleanupInterval: 5 * time.Minute,
61 MaxItems: 1000,
62 OnEviction: nil,
63 }
64}
65
66// Cache is a thread-safe in-memory cache with TTL and memory management.
67type Cache struct {

Callers 4

NewDefaultFunction · 0.85
TestCacheBasicOperationsFunction · 0.85
TestCacheEvictionFunction · 0.85
TestEvictionCallbackFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestCacheBasicOperationsFunction · 0.68
TestCacheEvictionFunction · 0.68
TestEvictionCallbackFunction · 0.68