cache string

make sure the `str` gets cached if it doesn't match