Hello,I found that the permissionsServiceImpl.setPermission always clears the whole cache (permissionAccessChace). This seems strange to me.
public void setPermission(NodeRef nodeRef, String authority, PermissionReference perm, boolean allow)
{
permissionsDaoComponent.setPermission(nodeRef, authority, perm, allow);
accessCache.clear();
}
Why for adding one permission for one noderef for one authority the whole cache is thrown away? It's a problem that also the "shared" cache is cleared - not only the trasactional.I'd rather expect the service manipulates the cache smartly and inserts/changes the permisions entry in the cache - sounds like a common cache scheme. Is there some hidden point I am missing?For me it's a little problem, cos I am having a performance issues resulting from permissions evaluations. I want to minimize the permissions loading from DB, and so caching would be enough. I even do some sort of cache pre-load. That would work but then a user invokes some common action that internally sets permission and all the cache is out. Would an update of the cache instead of clearing it be a problem to implement? Thank you for any comments.