Cache the template file in PHP

Per #138.