Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » AccessControlService and Permission cache
AccessControlService and Permission cache [message #840650] Tue, 10 April 2012 10:41 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 797
Registered: October 2011
Senior Member
I have following problem:

In my Application, the AccessControlService loads the Permissions for each user from a Database.

The application also provides a way to edit the corresponding database records (kind of administration Outline).

From what I have seen, the server calls the AccessControlService when a new user logs in. I assume the Permissions are cached after this.

After a modification of the database in the admin view, I somehow need to invalidate the cache.

I could imagine that the user needs to restart the client in order to have his modification on the Permission (force to refresh the Permission Cache after Log-in). But even this do not work yet.

What are the best practices? and how do I take control of the permission cache?
Re: AccessControlService and Permission cache [message #840677 is a reply to message #840650] Tue, 10 April 2012 11:19 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 797
Registered: October 2011
Senior Member
Just found:
* clearCache()
* clearCacheOfUserIds(String... userIds)
in the service extending IAccessControlService.

I still do not understand:
* Why isn't there any clear Cache for the user just after new log-in (restart of the client) or when the user quit the client application?
* When is the cache invalidated if none of the clear functions are called?

Is there any best practices?
Re: AccessControlService and Permission cache [message #841017 is a reply to message #840677] Tue, 10 April 2012 20:04 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 118
Registered: November 2010
Senior Member
J. Br. wrote on Tue, 10 April 2012 13:19
* When is the cache invalidated if none of the clear functions are called?


By default the TTL Cache in the AccessControlStore has a time to live from 3600000 milliseconds = 1 hour

org.eclipse.scout.rt.server.services.common.security.internal.AccessControlStore:
    m_store = new TTLCache<String, Permissions>(3600000L);
Previous Topic:NLS-Support in Scout
Next Topic:unit test
Goto Forum:
  


Current Time: Fri Nov 28 20:57:17 GMT 2014

Powered by FUDForum. Page generated in 0.01852 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software