Implemented caching tokenizer.