MCPcopy Index your code
hub / github.com/apache/casbin / Set

Method Set

persist/cache/cache.go:25–25  ·  view source on GitHub ↗

Set puts key and value into cache. First parameter for extra should be time.Time object denoting expected survival time. If survival time equals 0 or less, the key will always be survival.

(key string, value bool, extra ...interface{})

Source from the content-addressed store, hash-verified

23 // First parameter for extra should be time.Time object denoting expected survival time.
24 // If survival time equals 0 or less, the key will always be survival.
25 Set(key string, value bool, extra ...interface{}) error
26
27 // Get returns result for key,
28 // If there's no such key existing in cache,

Callers 6

setCachedResultMethod · 0.65
setCachedResultMethod · 0.65
TestExplainWithMockAPIFunction · 0.65
TestExplainDeniedFunction · 0.65
TestExplainAPIErrorFunction · 0.65
callAIAPIMethod · 0.65

Implementers 1

SyncCachepersist/cache/cache_sync.go

Calls

no outgoing calls

Tested by 3

TestExplainWithMockAPIFunction · 0.52
TestExplainDeniedFunction · 0.52
TestExplainAPIErrorFunction · 0.52