I am using Liferay 6.1 GA3 and I have an issue with cache and sharding. I have noticed that in method encodeLocalCacheKey ShardUtil.getCurrentShardName() always gets the same shard name (default). And because I have the same id-s for some layouts in each shard it generates the same key. Because I have two portal instances when I go to the first one date is cached with a key (with shard name default, this is not correct). When I go to the second portal instance data is loaded from cache but because the key is wrong it will get the data loaded from instance one.
I experience this issue when I want to access the page for the first time. It is not code made by me to control how currentShard is set.
More details regarding this: