Better permission caching