update get-compiled-template to use caching instead of always compiling
This commit is contained in:
parent
d38be15c27
commit
7b949c176f
|
@ -65,7 +65,10 @@
|
||||||
(defn- get-compiled-template [^File file]
|
(defn- get-compiled-template [^File file]
|
||||||
(if-not (.exists file)
|
(if-not (.exists file)
|
||||||
(throw (new FileNotFoundException (str "Template file \"" file "\" not found.")))
|
(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 []
|
(defn- create-function-repository []
|
||||||
(new DefaultFunctionRepository (make-array JtwigFunction 0)))
|
(new DefaultFunctionRepository (make-array JtwigFunction 0)))
|
||||||
|
|
Reference in a new issue