blob: cf961c6464cac6c5fbc718c133bf8a56e6032738 [file] [log] [blame]
Brian Silverman14fd0fb2014-01-14 21:42:01 -08001#include "aos/linux_code/output/ctemplate_cache.h"
brians2fdfc072013-02-26 05:35:15 +00002
Brian Silverman14fd0fb2014-01-14 21:42:01 -08003#include "aos/linux_code/configuration.h"
brians2fdfc072013-02-26 05:35:15 +00004#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