added "tx." check before putting cubes into the cache