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

Method set

pkg/security/access_control.go:1041–1050  ·  view source on GitHub ↗
(key string, decision *AccessDecision, ttl time.Duration)

Source from the content-addressed store, hash-verified

1039}
1040
1041func (cache *AccessCache) set(key string, decision *AccessDecision, ttl time.Duration) {
1042 cache.mu.Lock()
1043 defer cache.mu.Unlock()
1044
1045 cache.entries[key] = &CacheEntry{
1046 decision: decision,
1047 expiredAt: time.Now().Add(ttl),
1048 createdAt: time.Now(),
1049 }
1050}
1051
1052// 辅助函数
1053func contains(slice []string, item string) bool {

Callers 15

CheckPermissionMethod · 0.45
memoizeFunction · 0.45
addStepFunction · 0.45
addApprovalRequestFunction · 0.45
updateToolFunction · 0.45
handleToolStartFunction · 0.45
handleToolEndFunction · 0.45
handleTextChunkFunction · 0.45
processCreateSurfaceMethod · 0.45
processSurfaceUpdateMethod · 0.45
processBeginRenderingMethod · 0.45

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected