Sorry the queation was incomplete ..
We intend to use both modes of cache - replicated and distributed cache. [which is clustered]
Most of our cache is basically caching teh entities from database with a which is hidden behind a DAO layer.
Now if we need to invalidate the cache in all the nodes , what is teh best approach ?
[i see that calling cache.clear() only clear the values in teh local node.]
Sorry for the confusion , infact my test was wrong.
It did clear teh distributed cache :-)