In one of my articles I showed you how to create a simple JS template engine. In this article I will show you how to add simple caching to the compilation of our templates.
Caching with our template engine is pretty simple. 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.
#javascript #nodejs #web-development #expressjs