MCPcopy
hub / github.com/dosco/graphjin / CursorCache

Interface CursorCache

serv/mcp_cursor_cache.go:17–26  ·  view source on GitHub ↗

CursorCache is the interface for MCP cursor caching It maps short numeric IDs to encrypted cursor strings for LLM-friendly pagination

Source from the content-addressed store, hash-verified

15// CursorCache is the interface for MCP cursor caching
16// It maps short numeric IDs to encrypted cursor strings for LLM-friendly pagination
17type CursorCache interface {
18 // Set stores a cursor and returns a short numeric ID
19 Set(ctx context.Context, cursor string) (uint64, error)
20
21 // Get retrieves a cursor by its numeric ID
22 Get(ctx context.Context, id uint64) (string, error)
23
24 // Close releases resources
25 Close() error
26}
27
28// Redis key prefixes for cursor cache
29const (

Callers 4

SetMethod · 0.65
SetMethod · 0.65
GetMethod · 0.65
CloseMethod · 0.65

Implementers 5

RedisCursorCacheserv/mcp_cursor_cache.go
MemoryCursorCacheserv/mcp_cursor_cache.go
fakeRuntimeRedisserv/runtime_events_test.go
MemoryCacheserv/cache_memory.go
RedisCacheserv/cache_redis.go

Calls

no outgoing calls

Tested by

no test coverage detected