General Actions:
| Force reseting the cache of LDAP groups |
| Type | Snippet |
| Developed by | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
When using LDAP authentication you can (and should) setup a group cache which keep LDAP group in memory for some time to not redownload all of it every time someone authenticate. This can speedup quite a lot the authentication when there is a lot of groups of with a group containing a lot of users. See xwiki.authentication.ldap.groupcache_expiration property in xwiki.cfg and Authentication documentation.
This also mean that if you add or remove a user from a LDAP group you will not see it applied right away on XWiki.
To force applying to change you can execute the following groovy code which will force reseting the whole LDAP group cache: