MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / Get

Method Get

internal/repository/cache/local.go:58–67  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

56}
57
58func (r *rankingLocalCache) Get(ctx context.Context) ([]domain.Post, error) {
59 r.mu.RLock()
60 defer r.mu.RUnlock()
61
62 if err := r.validateCache(); err != nil {
63 return nil, err
64 }
65
66 return r.copyPosts(), nil
67}
68
69func (r *rankingLocalCache) ForceGet(ctx context.Context) ([]domain.Post, error) {
70 r.mu.RLock()

Callers

nothing calls this directly

Calls 2

validateCacheMethod · 0.95
copyPostsMethod · 0.95

Tested by

no test coverage detected