Prepared the TableGateway and ResultProcessor for caching