Cache template and array acces.