Просмотр исходного кода

Clear cache when running checks - cc @mscheibe

Andrew Kane 8 лет назад
Родитель
Сommit
139e7264a7
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      lib/blazer/data_source.rb

+ 6 - 2
lib/blazer/data_source.rb

@@ -110,8 +110,12 @@ module Blazer
     def run_statement(statement, options = {})
       run_id = options[:run_id]
       result = nil
-      if cache_mode != "off" && !options[:refresh_cache]
-        result = read_cache(statement_cache_key(statement))
+      if cache_mode != "off"
+        if options[:refresh_cache]
+          clear_cache(statement) # for checks
+        else
+          result = read_cache(statement_cache_key(statement))
+        end
       end
 
       unless result