Fixed cache rewriting to send format=json to API