#Cache
1 articles
14 How to Understanding HTML Template Cache in Golang
Introduction to Cache Templates
In previous program codes that we have studied practically, they were not efficient. Why did it happen? because every time it is accessed it will call a function and describe the data sent into the template so the process requires high levels of execution. Every time the handler is called we will always re-parse the template. So ideally the template only performs parsing once at the beginning when the application is running, then only the template data is cached (stored in memory) so there is no need to access the data and do the parsing again so that the website we create can be faster.