Use NSCache instead of a dictionary.

Completes #8.