Re factored code by replacing ehCache 'Element' with generic Object.