Implemented cache management. Warning : binary replication bug is persisting.