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?

0 votes

1 answers



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.

0 votes

I'm sorry, I remembered the method name incorrectly. I was referring to CacheManagement.putLocal(String key, Serializable value);

DirectoryCache uses the put() method which causes the automatic invalidation from all other nodes, so the key is effectively cached by only one node at a time.

Of course by using the putLocal() you'd need to handle the invalidations manually.


Ok I see what you mean, there's indeed a problem. I opened NXP-25065 for this.

Thank you for looking into this issue.