Cover a few more corner cases when encoding cache size and other
values to config strings.