We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c08047d commit 9056912Copy full SHA for 9056912
lib/curly/template_handler.rb
@@ -15,7 +15,19 @@ class << self
15
# Returns a String containing the Ruby code representing the template.
16
def call(template)
17
instrument(template) do
18
- compile(template)
+ if Curly.configuration.cache_store
19
+ cache_key = [
20
+ "CurlyCompilation",
21
+ template.virtual_path,
22
+ template.cache_key,
23
+ ].join("/")
24
+
25
+ Curly.configuration.cache_store.fetch(cache_key) do
26
+ compile(template)
27
+ end
28
+ else
29
30
31
end
32
33
0 commit comments