Andrew Kane před 9 roky
rodič
revize
dcc1b0235b

+ 1 - 1
lib/blazer/data_source.rb

@@ -49,7 +49,7 @@ module Blazer
       @cache ||= begin
         if settings["cache"].is_a?(Hash)
           settings["cache"]
-        else
+        elsif settings["cache"]
           {
             "mode" => "all",
             "expires_in" => settings["cache"]

+ 6 - 3
lib/generators/blazer/templates/config.yml

@@ -8,10 +8,13 @@ data_sources:
     # none by default
     # timeout: 15
 
-    # time to cache results, in minutes
+    # caching settings
     # can greatly improve speed
-    # none by default
-    # cache: 60
+    # off by default
+    # cache:
+    #   mode: slow # or all
+    #   expires_in: 60 # min
+    #   slow_threshold: 15 # sec
 
     # wrap queries in a transaction for safety
     # not necessary if you use a read-only user