Too Long; Didn't Read
In this article I will show you how to add simple caching to the compilation of our templates. We just keep a key value object and use template strings as keys and functions as values. This will make subsequent uses of a template faster. In this tutorial I showed how to extend the template engine we made in a previous post with caching for faster compilation and rendering. It is pretty simple to implement, we just need to runand then run that function with a function with the help of a cache.