MCPcopy
hub / github.com/apache/casbin / LoadPolicy

Method LoadPolicy

enforcer_cached.go:90–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88}
89
90func (e *CachedEnforcer) LoadPolicy() error {
91 if atomic.LoadInt32(&e.enableCache) != 0 {
92 if err := e.cache.Clear(); err != nil {
93 return err
94 }
95 }
96 return e.Enforcer.LoadPolicy()
97}
98
99func (e *CachedEnforcer) RemovePolicy(params ...interface{}) (bool, error) {
100 if atomic.LoadInt32(&e.enableCache) != 0 {

Callers

nothing calls this directly

Calls 2

ClearMethod · 0.65
LoadPolicyMethod · 0.65

Tested by

no test coverage detected