Sha256: 6d01645b035d9b80766f40ef941c242079a300140bc60c379c927725dedb7e5e

Contents?: true

Size: 482 Bytes

Versions: 27

Compression:

Stored size: 482 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! content: output
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
card-mod-machines-0.13.4 set/abstract/machine/output_cache.rb
card-mod-machines-0.13.3 set/abstract/machine/output_cache.rb
card-mod-machines-0.13.2 set/abstract/machine/output_cache.rb
card-mod-machines-0.13.1 set/abstract/machine/output_cache.rb
card-mod-machines-0.13.0 set/abstract/machine/output_cache.rb
card-mod-machines-0.11.7 set/abstract/machine/output_cache.rb
card-mod-machines-0.12.0 set/abstract/machine/output_cache.rb
card-mod-machines-0.11.6 set/abstract/machine/output_cache.rb
card-mod-machines-0.11.5 set/abstract/machine/output_cache.rb
card-mod-machines-0.11.4 set/abstract/machine/output_cache.rb
card-mod-machines-0.11.3 set/abstract/machine/output_cache.rb
card-mod-machines-0.11.2 set/abstract/machine/output_cache.rb
card-mod-machines-0.11.1 set/abstract/machine/output_cache.rb
card-mod-machines-0.11.0 set/abstract/machine/output_cache.rb
card-1.100.0 mod/machines/set/abstract/machine/output_cache.rb
card-1.99.6 mod/machines/set/abstract/machine/output_cache.rb
card-1.99.5 mod/machines/set/abstract/machine/output_cache.rb
card-1.99.4 mod/machines/set/abstract/machine/output_cache.rb
card-1.99.1 mod/machines/set/abstract/machine/output_cache.rb
card-1.99.0 mod/machines/set/abstract/machine/output_cache.rb