(params ...interface{})
| 97 | } |
| 98 | |
| 99 | func (e *CachedEnforcer) RemovePolicy(params ...interface{}) (bool, error) { |
| 100 | if atomic.LoadInt32(&e.enableCache) != 0 { |
| 101 | key, ok := e.getKey(params...) |
| 102 | if ok { |
| 103 | if err := e.cache.Delete(key); err != nil && err != cache.ErrNoSuchKey { |
| 104 | return false, err |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | return e.Enforcer.RemovePolicy(params...) |
| 109 | } |
| 110 | |
| 111 | func (e *CachedEnforcer) RemovePolicies(rules [][]string) (bool, error) { |
| 112 | if len(rules) != 0 { |