I have a Template Parser function which loads the raw html code of the template with the given name and replaces wildcards in it (%DATE%,etc). I will be using the same template more than once for some pages, e.g. a menu item, and so the html file would be loaded into memory more than once.
So one file would be read more than once because the ParseTemplate(name)
function is called more than once with the same template.
For clarity: The same template is going to be loaded more than once in one page.
Is it worth storing all loaded template files in an array so they don't have to be read with file_get_contents();
more than once?