Support raw strings in ToOptimizedResultUsingCache