update get-compiled-template to use caching instead of always compiling

This commit is contained in:
Gered 2014-03-02 13:54:45 -05:00
parent d38be15c27
commit 7b949c176f

View file

@ -65,7 +65,10 @@
(defn- get-compiled-template [^File file]
(if-not (.exists file)
(throw (new FileNotFoundException (str "Template file \"" file "\" not found.")))
(compile-template-file file)))
(get-cached-compiled-template
file
(fn [file]
(compile-template-file file)))))
(defn- create-function-repository []
(new DefaultFunctionRepository (make-array JtwigFunction 0)))