Sha256: c6d051e584f9eabf97d01b1284d5df40de1b121bedeeadc9237132aabfbd2fda

Contents?: true

Size: 493 Bytes

Versions: 12

Compression:

Stored size: 493 Bytes

Contents

def fetch_cache_card input_card, new=nil
  new &&= { type_id: PlainTextID }
  Card.fetch input_card.name, name, :machine_cache, new: new
end

def cache_output_part input_card, output
  Auth.as_bot do
    # save virtual cards first
    # otherwise the cache card will save it to get the left_id
    # and trigger the cache update again
    input_card.save! if input_card.new_card?

    cache_card = fetch_cache_card(input_card, true)
    cache_card.update_attributes! content: output
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
card-1.96.7 mod/machines/set/abstract/machine/output_cache.rb
card-1.96.6 mod/machines/set/abstract/machine/output_cache.rb
card-1.96.5 mod/machines/set/abstract/machine/output_cache.rb
card-1.96.4 mod/machines/set/abstract/machine/output_cache.rb
card-1.96.3 mod/machines/set/abstract/machine/output_cache.rb
card-1.96.2 mod/machines/set/abstract/machine/output_cache.rb
card-1.96.1 mod/machines/set/abstract/machine/output_cache.rb
card-1.96.0 mod/machines/set/abstract/machine/output_cache.rb
card-1.95.3 mod/machines/set/abstract/machine/output_cache.rb
card-1.95.2 mod/machines/set/abstract/machine/output_cache.rb
card-1.95.1 mod/machines/set/abstract/machine/output_cache.rb
card-1.95.0 mod/machines/set/abstract/machine/output_cache.rb