For something like this you want to use client/server mode (i.e. Infinispan Server with HotRod clients).
How are you accessing the caches from the two applications ?
If I understand the question, you don't want the two caches to be related in any way. I'd see the problem in you persistence configuration - if you persist both caches using the same file store (or JDBC store), obviously, it won't work well.
You should add a bit more details or better show what you mean by adding an example application, this will help to understand what you are asking