InvalidateCache deletes all the existing cached decisions.
()
| 152 | |
| 153 | // InvalidateCache deletes all the existing cached decisions. |
| 154 | func (e *CachedEnforcer) InvalidateCache() error { |
| 155 | e.locker.Lock() |
| 156 | defer e.locker.Unlock() |
| 157 | return e.cache.Clear() |
| 158 | } |
| 159 | |
| 160 | func GetCacheKey(params ...interface{}) (string, bool) { |
| 161 | key := strings.Builder{} |