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

Method InvalidateCache

enforcer_cached_synced.go:148–150  ·  view source on GitHub ↗

InvalidateCache deletes all the existing cached decisions.

()

Source from the content-addressed store, hash-verified

146
147// InvalidateCache deletes all the existing cached decisions.
148func (e *SyncedCachedEnforcer) InvalidateCache() error {
149 return e.cache.Clear()
150}
151
152func (e *SyncedCachedEnforcer) checkOneAndRemoveCache(params ...interface{}) (bool, error) {
153 if atomic.LoadInt32(&e.enableCache) != 0 {

Callers 1

TestSyncCacheFunction · 0.95

Calls 1

ClearMethod · 0.65

Tested by 1

TestSyncCacheFunction · 0.76