thermos 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e56655085c639d7a4badf9d091a170799398c2f
4
- data.tar.gz: 8d78876dfac8afa21c9e0ef83f1ef6355e943da2
3
+ metadata.gz: d17bae00eadc087f044feb617da37370bd93886f
4
+ data.tar.gz: 615505cb0409ab3a2c284e51f7475eda45018060
5
5
  SHA512:
6
- metadata.gz: 4ec22dd805affff9b331f0b5fa7249d8c74a4e453c54cd0c8bbe909d41971fcc252f1bd29238b716e04deb4fbd9aabc581df0db55be59ddbad94c57f0d6f7b7c
7
- data.tar.gz: 90c16773bac12acf6ba7ad295ed38785b806fab9e9aa24631820ff79be59c51ceb674632a0f22bdf91e737509bde433e22a8df375ca2b81f1f3c2925c6a5becd
6
+ metadata.gz: 70e900fc1a05b824e098c035dbf809ec5c4a704e476d468c870cfefcd3390bccd2a73d8271684d0e628fdaf2f52e655f49eb3c599527e5b75099e1baaeca3899
7
+ data.tar.gz: 50d84fbbdd655aba0398777fc88098eb2f21c500c484e6c067c43626331f4c336775b1cd034eefda55e04da6ef3187b70b53e7cec20e56a4cf6e485ece0936b4
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require 'bundler/setup'
3
5
  rescue LoadError
@@ -26,14 +28,8 @@ Rake::TestTask.new(:test) do |t|
26
28
  end
27
29
 
28
30
  task(:default) do
29
- Dir.chdir("test/dummy")
30
- system("rake db:migrate")
31
- Dir.chdir("../../")
31
+ Dir.chdir('test/dummy')
32
+ system('rake db:migrate')
33
+ Dir.chdir('../../')
32
34
  Rake::Task['test'].execute
33
35
  end
34
-
35
-
36
-
37
-
38
-
39
-
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Thermos
2
4
  class Beverage
3
5
  attr_reader :key, :model, :deps, :action, :lookup_key
@@ -17,9 +19,9 @@ module Thermos
17
19
  def lookup_keys_for_dep_model(dep_model)
18
20
  @deps.flat_map do |dep|
19
21
  return [] unless dep.klass == dep_model.class
20
- @model.joins(dep.association).
21
- where(dep.table => { id: dep_model.id }).
22
- pluck(@lookup_key)
22
+ @model.joins(dep.association)
23
+ .where(dep.table => { id: dep_model.id })
24
+ .pluck(@lookup_key)
23
25
  end.uniq
24
26
  end
25
27
 
@@ -1,20 +1,24 @@
1
- class Thermos::BeverageStorage
2
- include Singleton
1
+ # frozen_string_literal: true
3
2
 
4
- def add_beverage(beverage)
5
- @beverages ||= {}
6
- @beverages[beverage.key] ||= beverage
7
- end
3
+ module Thermos
4
+ class BeverageStorage
5
+ include Singleton
8
6
 
9
- def get_beverage(key)
10
- @beverages[key]
11
- end
7
+ def add_beverage(beverage)
8
+ @beverages ||= {}
9
+ @beverages[beverage.key] ||= beverage
10
+ end
12
11
 
13
- def empty
14
- @beverages = {}
15
- end
12
+ def get_beverage(key)
13
+ @beverages[key]
14
+ end
15
+
16
+ def empty
17
+ @beverages = {}
18
+ end
16
19
 
17
- def beverages
18
- @beverages.values
20
+ def beverages
21
+ @beverages.values
22
+ end
19
23
  end
20
24
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Thermos
2
4
  class Dependency
3
5
  attr_reader :model, :association, :klass, :table
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Thermos
2
4
  module Notifier
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Thermos
2
4
  class RebuildCacheJob < ActiveJob::Base
3
5
  def perform(key, id)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Thermos
2
4
  class RefillJob < ActiveJob::Base
3
5
  def perform(model)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Thermos
2
- VERSION = "0.1.0"
4
+ VERSION = '0.1.1'
3
5
  end
data/lib/thermos.rb CHANGED
@@ -1,12 +1,13 @@
1
- require "thermos/beverage"
2
- require "thermos/beverage_storage"
3
- require "thermos/dependency"
4
- require "thermos/notifier"
5
- require "thermos/refill_job"
6
- require "thermos/rebuild_cache_job"
1
+ # frozen_string_literal: true
7
2
 
8
- module Thermos
3
+ require 'thermos/beverage'
4
+ require 'thermos/beverage_storage'
5
+ require 'thermos/dependency'
6
+ require 'thermos/notifier'
7
+ require 'thermos/refill_job'
8
+ require 'thermos/rebuild_cache_job'
9
9
 
10
+ module Thermos
10
11
  def self.keep_warm(key:, model:, id:, deps: [], lookup_key: nil, &block)
11
12
  fill(key: key, model: model, deps: deps, lookup_key: lookup_key, &block)
12
13
  drink(key: key, id: id)
Binary file
@@ -157,3 +157,8 @@ true by adding the following to your application.rb file:
157
157
   (0.1ms) begin transaction
158
158
   (0.1ms) commit transaction
159
159
   (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
160
+  (2.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
161
+ ActiveRecord::InternalMetadata Load (0.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
162
+  (0.1ms) begin transaction
163
+  (0.1ms) commit transaction
164
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
@@ -2597,3 +2597,299 @@ ThermosTest: test_rebuilds_the_cache_on_primary_model_change
2597
2597
  [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 770b673a-2a5c-4ce5-ac86-7a1aad43c996) to Inline(default) with arguments: #<GlobalID:0x007fc5c86057f8 @uri=#<URI::GID gid://dummy/Category/322908140>>
2598
2598
   (0.1ms) RELEASE SAVEPOINT active_record_1
2599
2599
   (1.4ms) rollback transaction
2600
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2601
+  (0.0ms) PRAGMA foreign_keys
2602
+  (0.1ms) PRAGMA foreign_keys = OFF
2603
+  (0.0ms) begin transaction
2604
+ Fixture Delete (0.8ms) DELETE FROM "products"
2605
+ Fixture Delete (0.4ms) DELETE FROM "categories"
2606
+ Fixture Delete (0.5ms) DELETE FROM "category_items"
2607
+ Fixture Delete (0.3ms) DELETE FROM "stores"
2608
+ Fixture Insert (0.4ms) INSERT INTO "products" ("name", "created_at", "updated_at", "id") VALUES ('glove', '2018-10-17 13:37:02.417901', '2018-10-17 13:37:02.417901', 469160771)
2609
+ Fixture Insert (0.1ms) INSERT INTO "categories" ("name", "created_at", "updated_at", "id", "store_id") VALUES ('baseball', '2018-10-17 13:37:02.420471', '2018-10-17 13:37:02.420471', 322908140, 868874525)
2610
+ Fixture Insert (0.1ms) INSERT INTO "category_items" ("name", "created_at", "updated_at", "id", "category_id", "product_id") VALUES ('baseball glove', '2018-10-17 13:37:02.421468', '2018-10-17 13:37:02.421468', 678302810, 322908140, 469160771)
2611
+ Fixture Insert (0.1ms) INSERT INTO "stores" ("name", "created_at", "updated_at", "id") VALUES ('sports store', '2018-10-17 13:37:02.422510', '2018-10-17 13:37:02.422510', 868874525)
2612
+  (1.1ms) commit transaction
2613
+  (0.1ms) PRAGMA foreign_keys = 1
2614
+  (0.0ms) begin transaction
2615
+ ----------------------------------------------------------------------
2616
+ ThermosTest: test_re-builds_the_cache_for_new_has_many_through_records
2617
+ ----------------------------------------------------------------------
2618
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2619
+  (0.1ms) SAVEPOINT active_record_1
2620
+ Product Create (0.9ms) INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2018-10-17 13:37:02.465128"], ["updated_at", "2018-10-17 13:37:02.465128"]]
2621
+ CategoryItem Create (0.2ms) INSERT INTO "category_items" ("category_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 322908140], ["product_id", 469160772], ["created_at", "2018-10-17 13:37:02.466952"], ["updated_at", "2018-10-17 13:37:02.466952"]]
2622
+ [ActiveJob] Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160772], ["LIMIT", 1]]
2623
+ [ActiveJob] [Thermos::RefillJob] [f6eb6909-7331-4e25-8b49-d031ee9a112d] Performing Thermos::RefillJob (Job ID: f6eb6909-7331-4e25-8b49-d031ee9a112d) from Inline(default) with arguments: #<GlobalID:0x00007f9ec84d3140 @uri=#<URI::GID gid://dummy/Product/469160772>>
2624
+ [ActiveJob] [Thermos::RefillJob] [f6eb6909-7331-4e25-8b49-d031ee9a112d]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "category_items" ON "category_items"."category_id" = "categories"."id" INNER JOIN "products" ON "products"."id" = "category_items"."product_id" WHERE "products"."id" = ? [["id", 469160772]]
2625
+ [ActiveJob] [Thermos::RefillJob] [f6eb6909-7331-4e25-8b49-d031ee9a112d] [Thermos::RebuildCacheJob] [7fc02ae4-e84b-41af-b991-b4916a1cda70] Performing Thermos::RebuildCacheJob (Job ID: 7fc02ae4-e84b-41af-b991-b4916a1cda70) from Inline(default) with arguments: "key", 322908140
2626
+ [ActiveJob] [Thermos::RefillJob] [f6eb6909-7331-4e25-8b49-d031ee9a112d] [Thermos::RebuildCacheJob] [7fc02ae4-e84b-41af-b991-b4916a1cda70] Performed Thermos::RebuildCacheJob (Job ID: 7fc02ae4-e84b-41af-b991-b4916a1cda70) from Inline(default) in 1.45ms
2627
+ [ActiveJob] [Thermos::RefillJob] [f6eb6909-7331-4e25-8b49-d031ee9a112d] Enqueued Thermos::RebuildCacheJob (Job ID: 7fc02ae4-e84b-41af-b991-b4916a1cda70) to Inline(default) with arguments: "key", 322908140
2628
+ [ActiveJob] [Thermos::RefillJob] [f6eb6909-7331-4e25-8b49-d031ee9a112d] Performed Thermos::RefillJob (Job ID: f6eb6909-7331-4e25-8b49-d031ee9a112d) from Inline(default) in 12.28ms
2629
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: f6eb6909-7331-4e25-8b49-d031ee9a112d) to Inline(default) with arguments: #<GlobalID:0x00007f9ec84f0510 @uri=#<URI::GID gid://dummy/Product/469160772>>
2630
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2631
+  (0.3ms) rollback transaction
2632
+  (0.0ms) begin transaction
2633
+ --------------------------------------------------------------------------
2634
+ ThermosTest: test_accepts_and_can_rebuild_off_of_an_id_other_than_the_'id'
2635
+ --------------------------------------------------------------------------
2636
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2637
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160771], ["LIMIT", 1]]
2638
+  (0.1ms) SAVEPOINT active_record_1
2639
+ Category Update (0.4ms) UPDATE "categories" SET "name" = ?, "updated_at" = ? WHERE "categories"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.490276"], ["id", 322908140]]
2640
+ [ActiveJob] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2641
+ [ActiveJob] [Thermos::RefillJob] [c1adf091-a519-4ada-8565-752c0acc6ec7] Performing Thermos::RefillJob (Job ID: c1adf091-a519-4ada-8565-752c0acc6ec7) from Inline(default) with arguments: #<GlobalID:0x00007f9ec9da99d0 @uri=#<URI::GID gid://dummy/Category/322908140>>
2642
+ [ActiveJob] [Thermos::RefillJob] [c1adf091-a519-4ada-8565-752c0acc6ec7] [Thermos::RebuildCacheJob] [b6c6cc92-45c4-4071-a9d8-75140fbf242a] Performing Thermos::RebuildCacheJob (Job ID: b6c6cc92-45c4-4071-a9d8-75140fbf242a) from Inline(default) with arguments: "key", "foo"
2643
+ [ActiveJob] [Thermos::RefillJob] [c1adf091-a519-4ada-8565-752c0acc6ec7] [Thermos::RebuildCacheJob] [b6c6cc92-45c4-4071-a9d8-75140fbf242a] Performed Thermos::RebuildCacheJob (Job ID: b6c6cc92-45c4-4071-a9d8-75140fbf242a) from Inline(default) in 1.35ms
2644
+ [ActiveJob] [Thermos::RefillJob] [c1adf091-a519-4ada-8565-752c0acc6ec7] Enqueued Thermos::RebuildCacheJob (Job ID: b6c6cc92-45c4-4071-a9d8-75140fbf242a) to Inline(default) with arguments: "key", "foo"
2645
+ [ActiveJob] [Thermos::RefillJob] [c1adf091-a519-4ada-8565-752c0acc6ec7] Performed Thermos::RefillJob (Job ID: c1adf091-a519-4ada-8565-752c0acc6ec7) from Inline(default) in 1.93ms
2646
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: c1adf091-a519-4ada-8565-752c0acc6ec7) to Inline(default) with arguments: #<GlobalID:0x00007f9ec8a347b0 @uri=#<URI::GID gid://dummy/Category/322908140>>
2647
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2648
+  (0.1ms) SAVEPOINT active_record_1
2649
+ Product Update (0.2ms) UPDATE "products" SET "name" = ?, "updated_at" = ? WHERE "products"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.495609"], ["id", 469160771]]
2650
+ [ActiveJob] Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160771], ["LIMIT", 1]]
2651
+ [ActiveJob] [Thermos::RefillJob] [7d9f99a5-ee1a-483a-b272-c7a3e6db65e9] Performing Thermos::RefillJob (Job ID: 7d9f99a5-ee1a-483a-b272-c7a3e6db65e9) from Inline(default) with arguments: #<GlobalID:0x00007f9ec9d7b378 @uri=#<URI::GID gid://dummy/Product/469160771>>
2652
+ [ActiveJob] [Thermos::RefillJob] [7d9f99a5-ee1a-483a-b272-c7a3e6db65e9]  (0.1ms) SELECT "categories"."name" FROM "categories" INNER JOIN "category_items" ON "category_items"."category_id" = "categories"."id" INNER JOIN "products" ON "products"."id" = "category_items"."product_id" WHERE "products"."id" = ? [["id", 469160771]]
2653
+ [ActiveJob] [Thermos::RefillJob] [7d9f99a5-ee1a-483a-b272-c7a3e6db65e9] [Thermos::RebuildCacheJob] [9873385b-a200-4d75-9db8-b012877cb33e] Performing Thermos::RebuildCacheJob (Job ID: 9873385b-a200-4d75-9db8-b012877cb33e) from Inline(default) with arguments: "key", "foo"
2654
+ [ActiveJob] [Thermos::RefillJob] [7d9f99a5-ee1a-483a-b272-c7a3e6db65e9] [Thermos::RebuildCacheJob] [9873385b-a200-4d75-9db8-b012877cb33e] Performed Thermos::RebuildCacheJob (Job ID: 9873385b-a200-4d75-9db8-b012877cb33e) from Inline(default) in 0.81ms
2655
+ [ActiveJob] [Thermos::RefillJob] [7d9f99a5-ee1a-483a-b272-c7a3e6db65e9] Enqueued Thermos::RebuildCacheJob (Job ID: 9873385b-a200-4d75-9db8-b012877cb33e) to Inline(default) with arguments: "key", "foo"
2656
+ [ActiveJob] [Thermos::RefillJob] [7d9f99a5-ee1a-483a-b272-c7a3e6db65e9] Performed Thermos::RefillJob (Job ID: 7d9f99a5-ee1a-483a-b272-c7a3e6db65e9) from Inline(default) in 2.45ms
2657
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 7d9f99a5-ee1a-483a-b272-c7a3e6db65e9) to Inline(default) with arguments: #<GlobalID:0x00007f9ec9d8a8a0 @uri=#<URI::GID gid://dummy/Product/469160771>>
2658
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2659
+  (0.4ms) rollback transaction
2660
+  (0.1ms) begin transaction
2661
+ ----------------------------------------------------------------
2662
+ ThermosTest: test_re-builds_the_cache_for_new_belongs_to_records
2663
+ ----------------------------------------------------------------
2664
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2665
+  (0.1ms) SAVEPOINT active_record_1
2666
+ Store Create (0.4ms) INSERT INTO "stores" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "foo"], ["created_at", "2018-10-17 13:37:02.510175"], ["updated_at", "2018-10-17 13:37:02.510175"]]
2667
+ Category Update (0.1ms) UPDATE "categories" SET "store_id" = ?, "updated_at" = ? WHERE "categories"."id" = ? [["store_id", 868874526], ["updated_at", "2018-10-17 13:37:02.511243"], ["id", 322908140]]
2668
+ [ActiveJob] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2669
+ [ActiveJob] [Thermos::RefillJob] [17089a72-8e1a-4b4d-8398-98f7ccdf10a2] Performing Thermos::RefillJob (Job ID: 17089a72-8e1a-4b4d-8398-98f7ccdf10a2) from Inline(default) with arguments: #<GlobalID:0x00007f9ec8463cf0 @uri=#<URI::GID gid://dummy/Category/322908140>>
2670
+ [ActiveJob] [Thermos::RefillJob] [17089a72-8e1a-4b4d-8398-98f7ccdf10a2] [Thermos::RebuildCacheJob] [1a116646-d3ad-45b0-8684-0246bffba6b8] Performing Thermos::RebuildCacheJob (Job ID: 1a116646-d3ad-45b0-8684-0246bffba6b8) from Inline(default) with arguments: "key", 322908140
2671
+ [ActiveJob] [Thermos::RefillJob] [17089a72-8e1a-4b4d-8398-98f7ccdf10a2] [Thermos::RebuildCacheJob] [1a116646-d3ad-45b0-8684-0246bffba6b8] Performed Thermos::RebuildCacheJob (Job ID: 1a116646-d3ad-45b0-8684-0246bffba6b8) from Inline(default) in 1.12ms
2672
+ [ActiveJob] [Thermos::RefillJob] [17089a72-8e1a-4b4d-8398-98f7ccdf10a2] Enqueued Thermos::RebuildCacheJob (Job ID: 1a116646-d3ad-45b0-8684-0246bffba6b8) to Inline(default) with arguments: "key", 322908140
2673
+ [ActiveJob] [Thermos::RefillJob] [17089a72-8e1a-4b4d-8398-98f7ccdf10a2] Performed Thermos::RefillJob (Job ID: 17089a72-8e1a-4b4d-8398-98f7ccdf10a2) from Inline(default) in 1.55ms
2674
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 17089a72-8e1a-4b4d-8398-98f7ccdf10a2) to Inline(default) with arguments: #<GlobalID:0x00007f9ec8473448 @uri=#<URI::GID gid://dummy/Category/322908140>>
2675
+ [ActiveJob] Store Load (0.1ms) SELECT "stores".* FROM "stores" WHERE "stores"."id" = ? LIMIT ? [["id", 868874526], ["LIMIT", 1]]
2676
+ [ActiveJob] [Thermos::RefillJob] [8592d082-9b27-4381-989c-466593a9af75] Performing Thermos::RefillJob (Job ID: 8592d082-9b27-4381-989c-466593a9af75) from Inline(default) with arguments: #<GlobalID:0x00007f9ec9d0ada8 @uri=#<URI::GID gid://dummy/Store/868874526>>
2677
+ [ActiveJob] [Thermos::RefillJob] [8592d082-9b27-4381-989c-466593a9af75]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "stores" ON "stores"."id" = "categories"."store_id" WHERE "stores"."id" = ? [["id", 868874526]]
2678
+ [ActiveJob] [Thermos::RefillJob] [8592d082-9b27-4381-989c-466593a9af75] [Thermos::RebuildCacheJob] [736b8907-4f2e-43bf-923e-618ad9617c3a] Performing Thermos::RebuildCacheJob (Job ID: 736b8907-4f2e-43bf-923e-618ad9617c3a) from Inline(default) with arguments: "key", 322908140
2679
+ [ActiveJob] [Thermos::RefillJob] [8592d082-9b27-4381-989c-466593a9af75] [Thermos::RebuildCacheJob] [736b8907-4f2e-43bf-923e-618ad9617c3a] Performed Thermos::RebuildCacheJob (Job ID: 736b8907-4f2e-43bf-923e-618ad9617c3a) from Inline(default) in 0.63ms
2680
+ [ActiveJob] [Thermos::RefillJob] [8592d082-9b27-4381-989c-466593a9af75] Enqueued Thermos::RebuildCacheJob (Job ID: 736b8907-4f2e-43bf-923e-618ad9617c3a) to Inline(default) with arguments: "key", 322908140
2681
+ [ActiveJob] [Thermos::RefillJob] [8592d082-9b27-4381-989c-466593a9af75] Performed Thermos::RefillJob (Job ID: 8592d082-9b27-4381-989c-466593a9af75) from Inline(default) in 1.95ms
2682
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 8592d082-9b27-4381-989c-466593a9af75) to Inline(default) with arguments: #<GlobalID:0x00007f9ec84520e0 @uri=#<URI::GID gid://dummy/Store/868874526>>
2683
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2684
+  (0.4ms) rollback transaction
2685
+  (0.0ms) begin transaction
2686
+ ---------------------------------------------------------------------------------------------------------------------------
2687
+ ThermosTest: test_only_rebuilds_cache_for_stated_dependencies,_even_if_another_cache_has_an_associated_model_of_the_primary
2688
+ ---------------------------------------------------------------------------------------------------------------------------
2689
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2690
+ Product Load (0.0ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160771], ["LIMIT", 1]]
2691
+  (0.1ms) SAVEPOINT active_record_1
2692
+ Product Update (0.4ms) UPDATE "products" SET "name" = ?, "updated_at" = ? WHERE "products"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.521871"], ["id", 469160771]]
2693
+ [ActiveJob] Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160771], ["LIMIT", 1]]
2694
+ [ActiveJob] [Thermos::RefillJob] [05766290-acc5-4766-89cf-dfc19158dd95] Performing Thermos::RefillJob (Job ID: 05766290-acc5-4766-89cf-dfc19158dd95) from Inline(default) with arguments: #<GlobalID:0x00007f9ec92e7f88 @uri=#<URI::GID gid://dummy/Product/469160771>>
2695
+ [ActiveJob] [Thermos::RefillJob] [05766290-acc5-4766-89cf-dfc19158dd95] [Thermos::RebuildCacheJob] [b9d4743a-0a76-4a1c-a02b-ba6b85d02c1b] Performing Thermos::RebuildCacheJob (Job ID: b9d4743a-0a76-4a1c-a02b-ba6b85d02c1b) from Inline(default) with arguments: "product_key", 469160771
2696
+ [ActiveJob] [Thermos::RefillJob] [05766290-acc5-4766-89cf-dfc19158dd95] [Thermos::RebuildCacheJob] [b9d4743a-0a76-4a1c-a02b-ba6b85d02c1b] Performed Thermos::RebuildCacheJob (Job ID: b9d4743a-0a76-4a1c-a02b-ba6b85d02c1b) from Inline(default) in 1.24ms
2697
+ [ActiveJob] [Thermos::RefillJob] [05766290-acc5-4766-89cf-dfc19158dd95] Enqueued Thermos::RebuildCacheJob (Job ID: b9d4743a-0a76-4a1c-a02b-ba6b85d02c1b) to Inline(default) with arguments: "product_key", 469160771
2698
+ [ActiveJob] [Thermos::RefillJob] [05766290-acc5-4766-89cf-dfc19158dd95] Performed Thermos::RefillJob (Job ID: 05766290-acc5-4766-89cf-dfc19158dd95) from Inline(default) in 1.81ms
2699
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 05766290-acc5-4766-89cf-dfc19158dd95) to Inline(default) with arguments: #<GlobalID:0x00007f9ec92f7078 @uri=#<URI::GID gid://dummy/Product/469160771>>
2700
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2701
+  (0.4ms) rollback transaction
2702
+  (0.1ms) begin transaction
2703
+ ---------------------------------------------------------
2704
+ ThermosTest: test_keeps_the_cache_warm_using_fill_/_drink
2705
+ ---------------------------------------------------------
2706
+  (0.1ms) rollback transaction
2707
+  (0.0ms) begin transaction
2708
+ -----------------------------------------------------------------------------------
2709
+ ThermosTest: test_does_not_rebuild_the_cache_for_an_unrelated_has_many_model_change
2710
+ -----------------------------------------------------------------------------------
2711
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2712
+  (0.1ms) SAVEPOINT active_record_1
2713
+ CategoryItem Create (0.5ms) INSERT INTO "category_items" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2018-10-17 13:37:02.533319"], ["updated_at", "2018-10-17 13:37:02.533319"]]
2714
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2715
+  (0.1ms) SAVEPOINT active_record_1
2716
+ CategoryItem Update (0.1ms) UPDATE "category_items" SET "name" = ?, "updated_at" = ? WHERE "category_items"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.537245"], ["id", 678302811]]
2717
+ [ActiveJob] CategoryItem Load (0.1ms) SELECT "category_items".* FROM "category_items" WHERE "category_items"."id" = ? LIMIT ? [["id", 678302811], ["LIMIT", 1]]
2718
+ [ActiveJob] [Thermos::RefillJob] [331c65fa-0900-48cf-a99a-f586b9171a05] Performing Thermos::RefillJob (Job ID: 331c65fa-0900-48cf-a99a-f586b9171a05) from Inline(default) with arguments: #<GlobalID:0x00007f9ec9cd9f50 @uri=#<URI::GID gid://dummy/CategoryItem/678302811>>
2719
+ [ActiveJob] [Thermos::RefillJob] [331c65fa-0900-48cf-a99a-f586b9171a05]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "category_items" ON "category_items"."category_id" = "categories"."id" WHERE "category_items"."id" = ? [["id", 678302811]]
2720
+ [ActiveJob] [Thermos::RefillJob] [331c65fa-0900-48cf-a99a-f586b9171a05] Performed Thermos::RefillJob (Job ID: 331c65fa-0900-48cf-a99a-f586b9171a05) from Inline(default) in 1.33ms
2721
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 331c65fa-0900-48cf-a99a-f586b9171a05) to Inline(default) with arguments: #<GlobalID:0x00007f9ec8420b80 @uri=#<URI::GID gid://dummy/CategoryItem/678302811>>
2722
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2723
+  (0.3ms) rollback transaction
2724
+  (0.0ms) begin transaction
2725
+ -------------------------------------------------------------------------------------
2726
+ ThermosTest: test_does_not_rebuild_the_cache_for_an_unrelated_belongs_to_model_change
2727
+ -------------------------------------------------------------------------------------
2728
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2729
+  (0.0ms) SAVEPOINT active_record_1
2730
+ Store Create (0.5ms) INSERT INTO "stores" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2018-10-17 13:37:02.544805"], ["updated_at", "2018-10-17 13:37:02.544805"]]
2731
+ [ActiveJob] Store Load (0.1ms) SELECT "stores".* FROM "stores" WHERE "stores"."id" = ? LIMIT ? [["id", 868874526], ["LIMIT", 1]]
2732
+ [ActiveJob] [Thermos::RefillJob] [d6b4db6c-52c1-475b-9142-986012213dfa] Performing Thermos::RefillJob (Job ID: d6b4db6c-52c1-475b-9142-986012213dfa) from Inline(default) with arguments: #<GlobalID:0x00007f9ec83fb420 @uri=#<URI::GID gid://dummy/Store/868874526>>
2733
+ [ActiveJob] [Thermos::RefillJob] [d6b4db6c-52c1-475b-9142-986012213dfa] Performed Thermos::RefillJob (Job ID: d6b4db6c-52c1-475b-9142-986012213dfa) from Inline(default) in 0.03ms
2734
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: d6b4db6c-52c1-475b-9142-986012213dfa) to Inline(default) with arguments: #<GlobalID:0x00007f9ec84082b0 @uri=#<URI::GID gid://dummy/Store/868874526>>
2735
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2736
+  (0.0ms) SAVEPOINT active_record_1
2737
+ Store Update (0.1ms) UPDATE "stores" SET "name" = ?, "updated_at" = ? WHERE "stores"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.548996"], ["id", 868874526]]
2738
+ [ActiveJob] Store Load (0.1ms) SELECT "stores".* FROM "stores" WHERE "stores"."id" = ? LIMIT ? [["id", 868874526], ["LIMIT", 1]]
2739
+ [ActiveJob] [Thermos::RefillJob] [6d042871-6240-4ccc-8c00-4cbf1a15f752] Performing Thermos::RefillJob (Job ID: 6d042871-6240-4ccc-8c00-4cbf1a15f752) from Inline(default) with arguments: #<GlobalID:0x00007f9ec9ca1fb0 @uri=#<URI::GID gid://dummy/Store/868874526>>
2740
+ [ActiveJob] [Thermos::RefillJob] [6d042871-6240-4ccc-8c00-4cbf1a15f752]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "stores" ON "stores"."id" = "categories"."store_id" WHERE "stores"."id" = ? [["id", 868874526]]
2741
+ [ActiveJob] [Thermos::RefillJob] [6d042871-6240-4ccc-8c00-4cbf1a15f752] Performed Thermos::RefillJob (Job ID: 6d042871-6240-4ccc-8c00-4cbf1a15f752) from Inline(default) in 0.74ms
2742
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 6d042871-6240-4ccc-8c00-4cbf1a15f752) to Inline(default) with arguments: #<GlobalID:0x00007f9ec84082b0 @uri=#<URI::GID gid://dummy/Store/868874526>>
2743
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2744
+  (0.2ms) rollback transaction
2745
+  (0.1ms) begin transaction
2746
+ ---------------------------------------------------------------------
2747
+ ThermosTest: test_rebuilds_the_cache_on_has_many_through_model_change
2748
+ ---------------------------------------------------------------------
2749
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2750
+ Product Load (0.0ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160771], ["LIMIT", 1]]
2751
+  (0.1ms) SAVEPOINT active_record_1
2752
+ Product Update (0.3ms) UPDATE "products" SET "name" = ?, "updated_at" = ? WHERE "products"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.556556"], ["id", 469160771]]
2753
+ [ActiveJob] Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160771], ["LIMIT", 1]]
2754
+ [ActiveJob] [Thermos::RefillJob] [7d71b4aa-83ba-4337-b12b-3685beef0532] Performing Thermos::RefillJob (Job ID: 7d71b4aa-83ba-4337-b12b-3685beef0532) from Inline(default) with arguments: #<GlobalID:0x00007f9ec8a27830 @uri=#<URI::GID gid://dummy/Product/469160771>>
2755
+ [ActiveJob] [Thermos::RefillJob] [7d71b4aa-83ba-4337-b12b-3685beef0532]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "category_items" ON "category_items"."category_id" = "categories"."id" INNER JOIN "products" ON "products"."id" = "category_items"."product_id" WHERE "products"."id" = ? [["id", 469160771]]
2756
+ [ActiveJob] [Thermos::RefillJob] [7d71b4aa-83ba-4337-b12b-3685beef0532] [Thermos::RebuildCacheJob] [deffaa69-b604-411a-bd49-4ec0ef5c6798] Performing Thermos::RebuildCacheJob (Job ID: deffaa69-b604-411a-bd49-4ec0ef5c6798) from Inline(default) with arguments: "key", 322908140
2757
+ [ActiveJob] [Thermos::RefillJob] [7d71b4aa-83ba-4337-b12b-3685beef0532] [Thermos::RebuildCacheJob] [deffaa69-b604-411a-bd49-4ec0ef5c6798] Performed Thermos::RebuildCacheJob (Job ID: deffaa69-b604-411a-bd49-4ec0ef5c6798) from Inline(default) in 0.78ms
2758
+ [ActiveJob] [Thermos::RefillJob] [7d71b4aa-83ba-4337-b12b-3685beef0532] Enqueued Thermos::RebuildCacheJob (Job ID: deffaa69-b604-411a-bd49-4ec0ef5c6798) to Inline(default) with arguments: "key", 322908140
2759
+ [ActiveJob] [Thermos::RefillJob] [7d71b4aa-83ba-4337-b12b-3685beef0532] Performed Thermos::RefillJob (Job ID: 7d71b4aa-83ba-4337-b12b-3685beef0532) from Inline(default) in 2.14ms
2760
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 7d71b4aa-83ba-4337-b12b-3685beef0532) to Inline(default) with arguments: #<GlobalID:0x00007f9ec83cae88 @uri=#<URI::GID gid://dummy/Product/469160771>>
2761
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2762
+  (0.2ms) rollback transaction
2763
+  (0.1ms) begin transaction
2764
+ -------------------------------------------------------------
2765
+ ThermosTest: test_rebuilds_the_cache_on_has_many_model_change
2766
+ -------------------------------------------------------------
2767
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2768
+ CategoryItem Load (0.1ms) SELECT "category_items".* FROM "category_items" WHERE "category_items"."id" = ? LIMIT ? [["id", 678302810], ["LIMIT", 1]]
2769
+  (0.1ms) SAVEPOINT active_record_1
2770
+ CategoryItem Update (0.5ms) UPDATE "category_items" SET "name" = ?, "updated_at" = ? WHERE "category_items"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.565696"], ["id", 678302810]]
2771
+ [ActiveJob] CategoryItem Load (0.1ms) SELECT "category_items".* FROM "category_items" WHERE "category_items"."id" = ? LIMIT ? [["id", 678302810], ["LIMIT", 1]]
2772
+ [ActiveJob] [Thermos::RefillJob] [c852a13b-7e47-4164-ae3a-f233b8be3f5d] Performing Thermos::RefillJob (Job ID: c852a13b-7e47-4164-ae3a-f233b8be3f5d) from Inline(default) with arguments: #<GlobalID:0x00007f9ec89ee670 @uri=#<URI::GID gid://dummy/CategoryItem/678302810>>
2773
+ [ActiveJob] [Thermos::RefillJob] [c852a13b-7e47-4164-ae3a-f233b8be3f5d]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "category_items" ON "category_items"."category_id" = "categories"."id" WHERE "category_items"."id" = ? [["id", 678302810]]
2774
+ [ActiveJob] [Thermos::RefillJob] [c852a13b-7e47-4164-ae3a-f233b8be3f5d] [Thermos::RebuildCacheJob] [8cd0be44-3179-49ee-97af-e74ea4550e3a] Performing Thermos::RebuildCacheJob (Job ID: 8cd0be44-3179-49ee-97af-e74ea4550e3a) from Inline(default) with arguments: "key", 322908140
2775
+ [ActiveJob] [Thermos::RefillJob] [c852a13b-7e47-4164-ae3a-f233b8be3f5d] [Thermos::RebuildCacheJob] [8cd0be44-3179-49ee-97af-e74ea4550e3a] Performed Thermos::RebuildCacheJob (Job ID: 8cd0be44-3179-49ee-97af-e74ea4550e3a) from Inline(default) in 0.86ms
2776
+ [ActiveJob] [Thermos::RefillJob] [c852a13b-7e47-4164-ae3a-f233b8be3f5d] Enqueued Thermos::RebuildCacheJob (Job ID: 8cd0be44-3179-49ee-97af-e74ea4550e3a) to Inline(default) with arguments: "key", 322908140
2777
+ [ActiveJob] [Thermos::RefillJob] [c852a13b-7e47-4164-ae3a-f233b8be3f5d] Performed Thermos::RefillJob (Job ID: c852a13b-7e47-4164-ae3a-f233b8be3f5d) from Inline(default) in 2.35ms
2778
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: c852a13b-7e47-4164-ae3a-f233b8be3f5d) to Inline(default) with arguments: #<GlobalID:0x00007f9ec89f4a48 @uri=#<URI::GID gid://dummy/CategoryItem/678302810>>
2779
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2780
+  (0.2ms) rollback transaction
2781
+  (0.1ms) begin transaction
2782
+ ------------------------------------------------------
2783
+ ThermosTest: test_keeps_the_cache_warm_using_keep_warm
2784
+ ------------------------------------------------------
2785
+  (0.0ms) rollback transaction
2786
+  (0.0ms) begin transaction
2787
+ ------------------------------------------------------------
2788
+ ThermosTest: test_rebuilds_the_cache_on_primary_model_change
2789
+ ------------------------------------------------------------
2790
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2791
+  (0.1ms) SAVEPOINT active_record_1
2792
+ Category Update (0.3ms) UPDATE "categories" SET "name" = ?, "updated_at" = ? WHERE "categories"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.579396"], ["id", 322908140]]
2793
+ [ActiveJob] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2794
+ [ActiveJob] [Thermos::RefillJob] [5ecdfe39-3f8b-4c07-9f22-9eec0b254323] Performing Thermos::RefillJob (Job ID: 5ecdfe39-3f8b-4c07-9f22-9eec0b254323) from Inline(default) with arguments: #<GlobalID:0x00007f9ec9c12900 @uri=#<URI::GID gid://dummy/Category/322908140>>
2795
+ [ActiveJob] [Thermos::RefillJob] [5ecdfe39-3f8b-4c07-9f22-9eec0b254323] [Thermos::RebuildCacheJob] [e32a7a73-d985-4152-955e-9ba985e4a9ac] Performing Thermos::RebuildCacheJob (Job ID: e32a7a73-d985-4152-955e-9ba985e4a9ac) from Inline(default) with arguments: "key", 322908140
2796
+ [ActiveJob] [Thermos::RefillJob] [5ecdfe39-3f8b-4c07-9f22-9eec0b254323] [Thermos::RebuildCacheJob] [e32a7a73-d985-4152-955e-9ba985e4a9ac] Performed Thermos::RebuildCacheJob (Job ID: e32a7a73-d985-4152-955e-9ba985e4a9ac) from Inline(default) in 0.61ms
2797
+ [ActiveJob] [Thermos::RefillJob] [5ecdfe39-3f8b-4c07-9f22-9eec0b254323] Enqueued Thermos::RebuildCacheJob (Job ID: e32a7a73-d985-4152-955e-9ba985e4a9ac) to Inline(default) with arguments: "key", 322908140
2798
+ [ActiveJob] [Thermos::RefillJob] [5ecdfe39-3f8b-4c07-9f22-9eec0b254323] Performed Thermos::RefillJob (Job ID: 5ecdfe39-3f8b-4c07-9f22-9eec0b254323) from Inline(default) in 1.1ms
2799
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 5ecdfe39-3f8b-4c07-9f22-9eec0b254323) to Inline(default) with arguments: #<GlobalID:0x00007f9ec927f208 @uri=#<URI::GID gid://dummy/Category/322908140>>
2800
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2801
+  (0.3ms) rollback transaction
2802
+  (0.1ms) begin transaction
2803
+ -------------------------------------------------------------------------------------------
2804
+ ThermosTest: test_does_not_rebuild_the_cache_for_an_unrelated_has_many_through_model_change
2805
+ -------------------------------------------------------------------------------------------
2806
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2807
+  (0.1ms) SAVEPOINT active_record_1
2808
+ Product Create (0.4ms) INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2018-10-17 13:37:02.585745"], ["updated_at", "2018-10-17 13:37:02.585745"]]
2809
+ [ActiveJob] Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160772], ["LIMIT", 1]]
2810
+ [ActiveJob] [Thermos::RefillJob] [b748d3a7-858c-453c-a42e-aa54799d3e8b] Performing Thermos::RefillJob (Job ID: b748d3a7-858c-453c-a42e-aa54799d3e8b) from Inline(default) with arguments: #<GlobalID:0x00007f9ec89bc0f8 @uri=#<URI::GID gid://dummy/Product/469160772>>
2811
+ [ActiveJob] [Thermos::RefillJob] [b748d3a7-858c-453c-a42e-aa54799d3e8b] Performed Thermos::RefillJob (Job ID: b748d3a7-858c-453c-a42e-aa54799d3e8b) from Inline(default) in 0.03ms
2812
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: b748d3a7-858c-453c-a42e-aa54799d3e8b) to Inline(default) with arguments: #<GlobalID:0x00007f9ec89d53c8 @uri=#<URI::GID gid://dummy/Product/469160772>>
2813
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2814
+  (0.1ms) SAVEPOINT active_record_1
2815
+ Product Update (0.1ms) UPDATE "products" SET "name" = ?, "updated_at" = ? WHERE "products"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.590248"], ["id", 469160772]]
2816
+ [ActiveJob] Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT ? [["id", 469160772], ["LIMIT", 1]]
2817
+ [ActiveJob] [Thermos::RefillJob] [cc20e8f3-bea2-4a70-b929-f38c7f2469ef] Performing Thermos::RefillJob (Job ID: cc20e8f3-bea2-4a70-b929-f38c7f2469ef) from Inline(default) with arguments: #<GlobalID:0x00007f9ec9b89bf0 @uri=#<URI::GID gid://dummy/Product/469160772>>
2818
+ [ActiveJob] [Thermos::RefillJob] [cc20e8f3-bea2-4a70-b929-f38c7f2469ef]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "category_items" ON "category_items"."category_id" = "categories"."id" INNER JOIN "products" ON "products"."id" = "category_items"."product_id" WHERE "products"."id" = ? [["id", 469160772]]
2819
+ [ActiveJob] [Thermos::RefillJob] [cc20e8f3-bea2-4a70-b929-f38c7f2469ef] Performed Thermos::RefillJob (Job ID: cc20e8f3-bea2-4a70-b929-f38c7f2469ef) from Inline(default) in 0.78ms
2820
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: cc20e8f3-bea2-4a70-b929-f38c7f2469ef) to Inline(default) with arguments: #<GlobalID:0x00007f9ec89d53c8 @uri=#<URI::GID gid://dummy/Product/469160772>>
2821
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2822
+  (0.2ms) rollback transaction
2823
+  (0.0ms) begin transaction
2824
+ ---------------------------------------------------------------
2825
+ ThermosTest: test_rebuilds_the_cache_on_belongs_to_model_change
2826
+ ---------------------------------------------------------------
2827
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2828
+ Store Load (0.1ms) SELECT "stores".* FROM "stores" WHERE "stores"."id" = ? LIMIT ? [["id", 868874525], ["LIMIT", 1]]
2829
+  (0.1ms) SAVEPOINT active_record_1
2830
+ Store Update (0.4ms) UPDATE "stores" SET "name" = ?, "updated_at" = ? WHERE "stores"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.597532"], ["id", 868874525]]
2831
+ [ActiveJob] Store Load (0.1ms) SELECT "stores".* FROM "stores" WHERE "stores"."id" = ? LIMIT ? [["id", 868874525], ["LIMIT", 1]]
2832
+ [ActiveJob] [Thermos::RefillJob] [0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a] Performing Thermos::RefillJob (Job ID: 0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a) from Inline(default) with arguments: #<GlobalID:0x00007f9ec836ffb0 @uri=#<URI::GID gid://dummy/Store/868874525>>
2833
+ [ActiveJob] [Thermos::RefillJob] [0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "stores" ON "stores"."id" = "categories"."store_id" WHERE "stores"."id" = ? [["id", 868874525]]
2834
+ [ActiveJob] [Thermos::RefillJob] [0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a] [Thermos::RebuildCacheJob] [590ec84b-97bd-4e6d-89a1-4fd7c1e8d944] Performing Thermos::RebuildCacheJob (Job ID: 590ec84b-97bd-4e6d-89a1-4fd7c1e8d944) from Inline(default) with arguments: "key", 322908140
2835
+ [ActiveJob] [Thermos::RefillJob] [0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a] [Thermos::RebuildCacheJob] [590ec84b-97bd-4e6d-89a1-4fd7c1e8d944] Performed Thermos::RebuildCacheJob (Job ID: 590ec84b-97bd-4e6d-89a1-4fd7c1e8d944) from Inline(default) in 0.82ms
2836
+ [ActiveJob] [Thermos::RefillJob] [0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a] Enqueued Thermos::RebuildCacheJob (Job ID: 590ec84b-97bd-4e6d-89a1-4fd7c1e8d944) to Inline(default) with arguments: "key", 322908140
2837
+ [ActiveJob] [Thermos::RefillJob] [0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a] Performed Thermos::RefillJob (Job ID: 0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a) from Inline(default) in 2.4ms
2838
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 0945ffa7-06f8-4b0c-b1b1-9acf8f2ee09a) to Inline(default) with arguments: #<GlobalID:0x00007f9ec9226b58 @uri=#<URI::GID gid://dummy/Store/868874525>>
2839
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2840
+  (1.0ms) rollback transaction
2841
+  (0.1ms) begin transaction
2842
+ --------------------------------------------------------------
2843
+ ThermosTest: test_re-builds_the_cache_for_new_has_many_records
2844
+ --------------------------------------------------------------
2845
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2846
+  (0.0ms) SAVEPOINT active_record_1
2847
+ CategoryItem Create (0.3ms) INSERT INTO "category_items" ("category_id", "created_at", "updated_at") VALUES (?, ?, ?) [["category_id", 322908140], ["created_at", "2018-10-17 13:37:02.607684"], ["updated_at", "2018-10-17 13:37:02.607684"]]
2848
+ [ActiveJob] CategoryItem Load (0.1ms) SELECT "category_items".* FROM "category_items" WHERE "category_items"."id" = ? LIMIT ? [["id", 678302811], ["LIMIT", 1]]
2849
+ [ActiveJob] [Thermos::RefillJob] [f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43] Performing Thermos::RefillJob (Job ID: f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43) from Inline(default) with arguments: #<GlobalID:0x00007f9ec8355ac0 @uri=#<URI::GID gid://dummy/CategoryItem/678302811>>
2850
+ [ActiveJob] [Thermos::RefillJob] [f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43]  (0.1ms) SELECT "categories"."id" FROM "categories" INNER JOIN "category_items" ON "category_items"."category_id" = "categories"."id" WHERE "category_items"."id" = ? [["id", 678302811]]
2851
+ [ActiveJob] [Thermos::RefillJob] [f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43] [Thermos::RebuildCacheJob] [a2f7e256-e169-4545-99ec-6d0493174672] Performing Thermos::RebuildCacheJob (Job ID: a2f7e256-e169-4545-99ec-6d0493174672) from Inline(default) with arguments: "key", 322908140
2852
+ [ActiveJob] [Thermos::RefillJob] [f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43] [Thermos::RebuildCacheJob] [a2f7e256-e169-4545-99ec-6d0493174672] Performed Thermos::RebuildCacheJob (Job ID: a2f7e256-e169-4545-99ec-6d0493174672) from Inline(default) in 1.23ms
2853
+ [ActiveJob] [Thermos::RefillJob] [f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43] Enqueued Thermos::RebuildCacheJob (Job ID: a2f7e256-e169-4545-99ec-6d0493174672) to Inline(default) with arguments: "key", 322908140
2854
+ [ActiveJob] [Thermos::RefillJob] [f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43] Performed Thermos::RefillJob (Job ID: f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43) from Inline(default) in 2.42ms
2855
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: f4af1610-4ffa-4500-8ff6-a9d5d7ba4d43) to Inline(default) with arguments: #<GlobalID:0x00007f9ec897e2d0 @uri=#<URI::GID gid://dummy/CategoryItem/678302811>>
2856
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2857
+  (0.3ms) rollback transaction
2858
+  (0.0ms) begin transaction
2859
+ ----------------------------------------------------------------
2860
+ ThermosTest: test_pre-builds_cache_for_new_primary_model_records
2861
+ ----------------------------------------------------------------
2862
+  (0.1ms) SAVEPOINT active_record_1
2863
+ Category Create (0.4ms) INSERT INTO "categories" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "foo"], ["created_at", "2018-10-17 13:37:02.615082"], ["updated_at", "2018-10-17 13:37:02.615082"]]
2864
+ [ActiveJob] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908141], ["LIMIT", 1]]
2865
+ [ActiveJob] [Thermos::RefillJob] [9428df92-0c67-4175-8404-0ce3ad31a147] Performing Thermos::RefillJob (Job ID: 9428df92-0c67-4175-8404-0ce3ad31a147) from Inline(default) with arguments: #<GlobalID:0x00007f9ec82fd5f0 @uri=#<URI::GID gid://dummy/Category/322908141>>
2866
+ [ActiveJob] [Thermos::RefillJob] [9428df92-0c67-4175-8404-0ce3ad31a147] [Thermos::RebuildCacheJob] [05c4a5cf-22c4-4247-8c5a-e5d3008e77d4] Performing Thermos::RebuildCacheJob (Job ID: 05c4a5cf-22c4-4247-8c5a-e5d3008e77d4) from Inline(default) with arguments: "key", "foo"
2867
+ [ActiveJob] [Thermos::RefillJob] [9428df92-0c67-4175-8404-0ce3ad31a147] [Thermos::RebuildCacheJob] [05c4a5cf-22c4-4247-8c5a-e5d3008e77d4] Performed Thermos::RebuildCacheJob (Job ID: 05c4a5cf-22c4-4247-8c5a-e5d3008e77d4) from Inline(default) in 1.15ms
2868
+ [ActiveJob] [Thermos::RefillJob] [9428df92-0c67-4175-8404-0ce3ad31a147] Enqueued Thermos::RebuildCacheJob (Job ID: 05c4a5cf-22c4-4247-8c5a-e5d3008e77d4) to Inline(default) with arguments: "key", "foo"
2869
+ [ActiveJob] [Thermos::RefillJob] [9428df92-0c67-4175-8404-0ce3ad31a147] Performed Thermos::RefillJob (Job ID: 9428df92-0c67-4175-8404-0ce3ad31a147) from Inline(default) in 1.74ms
2870
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: 9428df92-0c67-4175-8404-0ce3ad31a147) to Inline(default) with arguments: #<GlobalID:0x00007f9ec89477d0 @uri=#<URI::GID gid://dummy/Category/322908141>>
2871
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2872
+  (0.4ms) rollback transaction
2873
+  (0.1ms) begin transaction
2874
+ ----------------------------------------------------------------------------------
2875
+ ThermosTest: test_does_not_rebuild_the_cache_for_an_unrelated_primary_model_change
2876
+ ----------------------------------------------------------------------------------
2877
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2878
+  (0.1ms) SAVEPOINT active_record_1
2879
+ Category Create (0.5ms) INSERT INTO "categories" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "bar"], ["created_at", "2018-10-17 13:37:02.624706"], ["updated_at", "2018-10-17 13:37:02.624706"]]
2880
+ [ActiveJob] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908141], ["LIMIT", 1]]
2881
+ [ActiveJob] [Thermos::RefillJob] [ce445ba7-181a-47e4-8da0-9e69f71b07eb] Performing Thermos::RefillJob (Job ID: ce445ba7-181a-47e4-8da0-9e69f71b07eb) from Inline(default) with arguments: #<GlobalID:0x00007f9ec913cdf0 @uri=#<URI::GID gid://dummy/Category/322908141>>
2882
+ [ActiveJob] [Thermos::RefillJob] [ce445ba7-181a-47e4-8da0-9e69f71b07eb] Performed Thermos::RefillJob (Job ID: ce445ba7-181a-47e4-8da0-9e69f71b07eb) from Inline(default) in 0.03ms
2883
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: ce445ba7-181a-47e4-8da0-9e69f71b07eb) to Inline(default) with arguments: #<GlobalID:0x00007f9ec916dfe0 @uri=#<URI::GID gid://dummy/Category/322908141>>
2884
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2885
+  (0.0ms) SAVEPOINT active_record_1
2886
+ Category Update (0.1ms) UPDATE "categories" SET "name" = ?, "updated_at" = ? WHERE "categories"."id" = ? [["name", "foo"], ["updated_at", "2018-10-17 13:37:02.630373"], ["id", 322908140]]
2887
+ [ActiveJob] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT ? [["id", 322908140], ["LIMIT", 1]]
2888
+ [ActiveJob] [Thermos::RefillJob] [fa7c965f-5b7f-416e-8230-fbfafa44bb5b] Performing Thermos::RefillJob (Job ID: fa7c965f-5b7f-416e-8230-fbfafa44bb5b) from Inline(default) with arguments: #<GlobalID:0x00007f9ec910c9e8 @uri=#<URI::GID gid://dummy/Category/322908140>>
2889
+ [ActiveJob] [Thermos::RefillJob] [fa7c965f-5b7f-416e-8230-fbfafa44bb5b] [Thermos::RebuildCacheJob] [c22ac873-c830-492a-b1c7-15ac9472ce76] Performing Thermos::RebuildCacheJob (Job ID: c22ac873-c830-492a-b1c7-15ac9472ce76) from Inline(default) with arguments: "key", 322908140
2890
+ [ActiveJob] [Thermos::RefillJob] [fa7c965f-5b7f-416e-8230-fbfafa44bb5b] [Thermos::RebuildCacheJob] [c22ac873-c830-492a-b1c7-15ac9472ce76] Performed Thermos::RebuildCacheJob (Job ID: c22ac873-c830-492a-b1c7-15ac9472ce76) from Inline(default) in 1.36ms
2891
+ [ActiveJob] [Thermos::RefillJob] [fa7c965f-5b7f-416e-8230-fbfafa44bb5b] Enqueued Thermos::RebuildCacheJob (Job ID: c22ac873-c830-492a-b1c7-15ac9472ce76) to Inline(default) with arguments: "key", 322908140
2892
+ [ActiveJob] [Thermos::RefillJob] [fa7c965f-5b7f-416e-8230-fbfafa44bb5b] Performed Thermos::RefillJob (Job ID: fa7c965f-5b7f-416e-8230-fbfafa44bb5b) from Inline(default) in 2.67ms
2893
+ [ActiveJob] Enqueued Thermos::RefillJob (Job ID: fa7c965f-5b7f-416e-8230-fbfafa44bb5b) to Inline(default) with arguments: #<GlobalID:0x00007f9ec9a48750 @uri=#<URI::GID gid://dummy/Category/322908140>>
2894
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2895
+  (0.3ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thermos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Thal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-16 00:00:00.000000000 Z
11
+ date: 2018-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 5.0.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: sqlite3
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: sqlite3
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -52,17 +52,17 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Thermos is a library for caching in rails that re-warms caches in the
56
- background based on model changes.
55
+ description: |
56
+ Thermos is a library for caching in rails that re-warms caches
57
+ in the background based on model changes.
57
58
  email:
58
- - hi@athal7.com
59
+ - athal7@me.com
59
60
  executables: []
60
61
  extensions: []
61
62
  extra_rdoc_files: []
62
63
  files:
63
64
  - MIT-LICENSE
64
65
  - Rakefile
65
- - lib/tasks/thermos_tasks.rake
66
66
  - lib/thermos.rb
67
67
  - lib/thermos/beverage.rb
68
68
  - lib/thermos/beverage_storage.rb
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :thermos do
3
- # # Task goes here
4
- # end