blob: a73e4ad240eb8069b4d713eef835006b7068c9e3 [file] [log] [blame]
brians2fdfc072013-02-26 05:35:15 +00001#include "aos/atom_code/output/ctemplate_cache.h"
2
3#include "aos/common/Configuration.h"
4#include "aos/common/once.h"
5
6namespace aos {
7namespace http {
8
9namespace {
10ctemplate::TemplateCache *CreateTemplateCache() {
11 ctemplate::TemplateCache *r = new ctemplate::TemplateCache();
12
13 r->SetTemplateRootDirectory(configuration::GetRootDirectory());
14
15 return r;
16}
17} // namespace
18ctemplate::TemplateCache *get_template_cache() {
19 static Once<ctemplate::TemplateCache> once(CreateTemplateCache);
20 return once.Get();
21}
22
23} // namespace http
24} // namespace aos