(ctx context.Context)
| 56 | } |
| 57 | |
| 58 | func (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 | |
| 69 | func (r *rankingLocalCache) ForceGet(ctx context.Context) ([]domain.Post, error) { |
| 70 | r.mu.RLock() |
nothing calls this directly
no test coverage detected