Fix to make urls canonical when storing in cache