Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/etsource/merit_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def import_agriculture_heat
#
# Returns a hash.
def import(attribute)
Rails.cache.fetch("#{attribute}_hash") do
NastyCache.instance.fetch("#{attribute}_hash") do
mo_nodes = Atlas::EnergyNode.all.select(&attribute).sort_by(&:key)
mo_data = {}

Expand Down
4 changes: 2 additions & 2 deletions app/models/etsource/molecules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Molecules
#
# Returns an Array of Symbols.
def from_energy_keys
Rails.cache.fetch('molecules.from_energy_keys') do
NastyCache.instance.fetch('molecules.from_energy_keys') do
Atlas::MoleculeNode.all.select(&:from_energy).map(&:key).sort
end
end
Expand All @@ -24,7 +24,7 @@ def from_energy_keys
#
# Returns an Array of Symbols.
def from_molecules_keys
Rails.cache.fetch('molecules.from_molecules_keys') do
NastyCache.instance.fetch('molecules.from_molecules_keys') do
Atlas::EnergyNode.all.select(&:from_molecules).map(&:key).sort
end
end
Expand Down