You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to transfer-dev
I have a SQL based ACL system that I'm using in my tranfser based
application. I have left the caching at the default of "instance".
Each of my access controlled transfer objects has a permits() method
that runs a query against the databse each time it is called, so in my
code I say things like:
I'd like to be able to cache the results of that query in my transfer
object so that I don't have to go to the database every time I want to
check the permission. I was thinking I could use a lastAccessedBy
variable in the variables scope of my TO that checked to see if the
user currently calling the permits() method is the same one as the
last person who called the permits() method so that I could use the
cached results instead of running the query again. The thing I'm
worried about is concurrency, how can I be absolutely sure that the
lastAccessedBy value is correct when pulling a TO out of the cache?
Mark Mandel
unread,
Nov 6, 2009, 3:20:17 PM11/6/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to transf...@googlegroups.com
This doesn't really seem like a transfer question - but why not store the result based on the user id inside the object?
That way you only ever retrieve the cached result for that user?