Business intelligence made simple
Fixed caching
Andrew Kaneac62730db920
diff --git a/lib/blazer/data_source.rb b/lib/blazer/data_source.rbindex 8d919395..1c244a36 100644--- a/lib/blazer/data_source.rb+++ b/lib/blazer/data_source.rb@@ -149,18 +149,13 @@ module Blazerenddef run_statement(statement, options = {})- columns = nil- rows = nil- error = nil- cached_at = nil- just_cached = falserun_id = options[:run_id]- cache_key = statement_cache_key(statement) if cache_mode != "off"+ result = nilif cache_mode != "off" && !options[:refresh_cache]- result = read_cache(cache_key)+ result = read_cache(statement_cache_key(statement))end- unless rows+ unless resultcomment = "blazer"if options[:user].respond_to?(:id)comment << ",user_id:#{options[:user].id}"