In an ACL script, can you clear a users cache?

Charles Hong
Mega Expert

Hello -

So i have an ACL which contains a script. See below. However, in this script, is there also a code that i can use to clear the cache for this user? and not everyone (system wide)? 

 

answer = isGroupMember();
function isGroupMember() {
if (!gs.getUser().isMemberOf('Asset Managers')) {
return true;
} else {
return false;
}
}

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

Try gs.cacheFlush();


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

2 REPLIES 2

SanjivMeher
Kilo Patron
Kilo Patron

Try gs.cacheFlush();


Please mark this response as correct or helpful if it assisted you with your question.

Roger19
Tera Contributor

Hi Charles,

why do you want to clear the cache within an ACL?

Doing so, will off course force the system to rebuild the cache immediately.

If you do this within an ACL, it would be done so much, if will decrease performance and even might cause a server node to crash.

 

Next question is, why do you want to check membership of a certain group within an ACL script?

What you should do is:

- create a role

- assign it to the group 

- check for this role in the Access role (assign the role to the ACL)

 

Try to limit scripts in ACLs...!    🙂

 

Cheers

Roger