소스 검색

Clear cache when running checks - cc @mscheibe

Andrew Kane 8 년 전
부모
커밋
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