Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
move options atom to avoid an upcoming circular dependency issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gered committed Jun 1, 2014
1 parent 12aabb6 commit d455c6c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/clj_jtwig/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,8 @@
(java.net URL))
(:require [clojure.walk :refer [stringify-keys]])
(:use [clj-jtwig.functions]
[clj-jtwig.utils]))

; global options
(defonce options (atom {; true/false to enable/disable compiled template caching when using templates from
; files only. this does not affect templates being rendered directly from strings
:cache-compiled-templates true

; true/false to enable/disable file status checks (existance of file and last modification
; date/time check). if true, these checks will be skipped ONLY if a compiled template for
; the filepath given is cached already. if this is true and an attempt is made to render
; a template which is not yet cached, these checks will still be run (this is to ensure that
; templates can still be loaded and compiled the first time they are rendered).
; if caching is completely disabled (via the above option), then this setting is ignored and
; file status checks will always be performed.
; this option is intended to help increase performance when you know in advance that your
; templates will not be modified/deleted after they are first compiled and you want to skip
; any unnecessary file I/O.
:skip-file-status-checks false}))
[clj-jtwig.utils]
[clj-jtwig.options]))

(declare flush-template-cache!)

Expand Down
20 changes: 20 additions & 0 deletions src/clj_jtwig/options.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(ns clj-jtwig.options)

; global options
(defonce options
(atom
{; true/false to enable/disable compiled template caching when using templates from
; files only. this does not affect templates being rendered directly from strings
:cache-compiled-templates true

; true/false to enable/disable file status checks (existance of file and last modification
; date/time check). if true, these checks will be skipped ONLY if a compiled template for
; the filepath given is cached already. if this is true and an attempt is made to render
; a template which is not yet cached, these checks will still be run (this is to ensure that
; templates can still be loaded and compiled the first time they are rendered).
; if caching is completely disabled (via the above option), then this setting is ignored and
; file status checks will always be performed.
; this option is intended to help increase performance when you know in advance that your
; templates will not be modified/deleted after they are first compiled and you want to skip
; any unnecessary file I/O.
:skip-file-status-checks false}))

0 comments on commit d455c6c

Please sign in to comment.