DirectoryCache invalidations in clustered setup
DirectoryCache uses put() function to add items to cache instead of localPut(). Using put() causes a “cacheinval” message to be sent and the key will be cleared from other nodes. When those nodes need to use the key they will do the same and clear the key from other nodes. This is not very efficient and causes a flood of inval messages.
Is this the way it's supposed to work or am I missing something?
What code are you talking about exactly? What class or interface would
localPut be a method of?
In recent versions of Nuxeo (since 9.3, see NXP-22786) there is only local caching with cross-cluster invalidation propagated by a pub/sub mechanism.
Of course by using the putLocal() you'd need to handle the invalidations manually.