diff --git a/app/models/cost_query/sql_statement.rb b/app/models/cost_query/sql_statement.rb index a627087308..c075204a4d 100644 --- a/app/models/cost_query/sql_statement.rb +++ b/app/models/cost_query/sql_statement.rb @@ -49,15 +49,13 @@ class CostQuery::SqlStatement # @return [CostQuery::SqlStatement] Generated statement def self.unified_entry(model) table = table_name_for model - Rails.cache.fetch("unified_#{table}") do - new(table).tap do |query| - query.select COMMON_FIELDS - query.select({ - :type => model.model_name.inspect, :count => 1, :id => [model, :id], - :real_costs => switch("#{table}.overridden_costs IS NULL" => [model, :costs], :else => [model, :overridden_costs]) - }) - send("unify_#{table}", query) - end + new(table).tap do |query| + query.select COMMON_FIELDS + query.select({ + :type => model.model_name.inspect, :count => 1, :id => [model, :id], + :real_costs => switch("#{table}.overridden_costs IS NULL" => [model, :costs], :else => [model, :overridden_costs]) + }) + send("unify_#{table}", query) end end