MCPcopy Create free account
hub / github.com/astercloud/aster / GetTopK

Method GetTopK

pkg/memory/logic/store_inmemory.go:158–160  ·  view source on GitHub ↗

GetTopK 获取 TopK Memory

(ctx context.Context, namespace string, k int, orderBy OrderBy)

Source from the content-addressed store, hash-verified

156
157// GetTopK 获取 TopK Memory
158func (s *InMemoryStore) GetTopK(ctx context.Context, namespace string, k int, orderBy OrderBy) ([]*LogicMemory, error) {
159 return s.List(ctx, namespace, WithTopK(k), WithOrderBy(orderBy))
160}
161
162// IncrementAccessCount 增加访问计数
163func (s *InMemoryStore) IncrementAccessCount(ctx context.Context, namespace, key string) error {

Callers 1

Calls 3

ListMethod · 0.95
WithTopKFunction · 0.85
WithOrderByFunction · 0.85

Tested by 1