Add cache middleware