cache string

make sure the `str` gets cached if it doesn't match
Merge pull request #1 from doowb/master

cache string