Thanks for this, I will have a look.
I have been able to recreate this. I will soon add a modified version of your test (modified to fit our test fwk) to our unit test suite.
Just as an FYI, this fails on branch 2.1.X but not on trunk (soon-to-be 2.2.0). I'll add a more formal analysis about this issue soon, but for now, see:
JBCACHE-1320, which is a feature added in 2.2.0 which probably fixed this issue.
Okay, I have traced this down and it has nothing to do with JBCACHE-1320. It has been fixed in trunk as a matter of course in refactoring some classes.
It is fixed in Branch 2.1.X as well and will be released with 2.1.1, but there is a workaround for 2.1.0.GA as well - see JBCACHE-1330.
Do let me know if the workaround solves your problem!
I have done some small scale tests with FetchInMemoryState set to false and it seems to be working and does not interfere with the expected behavior (as long as we are using buddy replication).
We will make larger scale tests for this when 2.1.1.GA is released.