Explorar el Código

Fixed cache invalidate when switching modes

Andrew Kane hace 8 años
padre
commit
61163a683a
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      lib/blazer/data_source.rb

+ 2 - 2
lib/blazer/data_source.rb

@@ -139,8 +139,8 @@ module Blazer
       error = nil
       cached_at = nil
       just_cached = false
-      cache_key = self.cache_key(statement) if cache
-      if cache && !options[:refresh_cache]
+      cache_key = self.cache_key(statement) if cache_mode != "off"
+      if cache_mode != "off" && !options[:refresh_cache]
         value = Blazer.cache.read(cache_key)
         columns, rows, cached_at = Marshal.load(value) if value
       end