Rewrites caching in transactions for a better multi-threading/processing handling.