evt-entity_cache 0.16.0.1 → 0.16.0.2

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
  SHA256:
3
- metadata.gz: 6907d92402603f5459f68ee18f09f81c0e924468479af431bf4dcce2922b03e8
4
- data.tar.gz: c20e4933a698526dd4fc77d6ba720bdb03299dc1d5f67e023ebafa9aa8b73f8b
3
+ metadata.gz: 4e558e0a49528e4c6782134259c0b38cbd1af60d8421687ef6ce206b4e0e773b
4
+ data.tar.gz: 9e46dcdc98b9f84e0e3f5e1d38e913d7b4aef730d3f2a0174c5432befcd87616
5
5
  SHA512:
6
- metadata.gz: 2c1966804e9604b8fa8f8dd6b115fff5e147e6318a12d21c232c40869f0fd64aa4a34506abca51535ff078f6c16bd586d67b8aec4fde62a7d21df24e7279dc78
7
- data.tar.gz: da32d173c24673c504b7217f40a04f6378fee23b9896bd722885fb8f5eb7cd64114cefc3aa2933a6cbfc8d1e193a4dff405180661a726b76eb6fb2cd61abf7ce
6
+ metadata.gz: 6f88fea27ac26be198f38d4b79e4d28c472210c45714cebe90985218434cf35f29310c86ef733072343c1a6ff99193c2aa401dfb1adc1850709a301d08c45b8e
7
+ data.tar.gz: 3cc2d4dd954060ab36e5e114c071957cf405e5ed0356033042f35a33aa08c8a0e0806c77a9e5180569078d44506ba1a973d6845b07ed52b713581f7a5538c67a
@@ -41,7 +41,7 @@ class EntityCache
41
41
  end
42
42
 
43
43
  def get(id)
44
- logger.trace { "Get entity (ID: #{id.inspect})" }
44
+ logger.trace(tag: :cache) { "Get entity (ID: #{id.inspect})" }
45
45
 
46
46
  record = internal_store.get(id)
47
47
 
@@ -50,9 +50,9 @@ class EntityCache
50
50
  end
51
51
 
52
52
  if record.nil?
53
- logger.info { "Get entity failed; cache miss (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
53
+ logger.info(tag: :cache) { "Cache miss getting entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
54
54
  else
55
- logger.info { "Get entity done (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
55
+ logger.info(tag: :cache) { "Get entity done (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
56
56
  end
57
57
 
58
58
  record
@@ -65,7 +65,7 @@ class EntityCache
65
65
 
66
66
  record = Record.build(id, entity, version, time)
67
67
 
68
- logger.trace { "Put entity (ID: #{id.inspect}, #{Record::LogText.get(record)}, Persist Interval: #{persist_interval.inspect})" }
68
+ logger.trace(tag: :cache) { "Put entity (ID: #{id.inspect}, #{Record::LogText.get(record)}, Persist Interval: #{persist_interval.inspect})" }
69
69
 
70
70
  if persist?(version, persisted_version)
71
71
  external_store.put(id, entity, version, time)
@@ -80,18 +80,18 @@ class EntityCache
80
80
 
81
81
  internal_store.put(record)
82
82
 
83
- logger.info { "Put entity done (ID: #{id.inspect}, #{Record::LogText.get(record)}, Persist Interval: #{persist_interval.inspect}, Updated External Store: #{updated_external_store})" }
83
+ logger.info(tag: :cache) { "Put entity done (ID: #{id.inspect}, #{Record::LogText.get(record)}, Persist Interval: #{persist_interval.inspect}, Updated External Store: #{updated_external_store})" }
84
84
 
85
85
  record
86
86
  end
87
87
 
88
88
  def restore(id)
89
- logger.trace { "Restoring entity (ID: #{id.inspect})" }
89
+ logger.trace(tag: :cache) { "Restoring entity (ID: #{id.inspect})" }
90
90
 
91
91
  entity, version, time = external_store.get(id)
92
92
 
93
93
  if entity.nil?
94
- logger.debug { "Could not restore entity (ID: #{id.inspect})" }
94
+ logger.debug(tag: :cache) { "Could not restore entity. No entity record. (ID: #{id.inspect})" }
95
95
 
96
96
  return nil
97
97
  end
@@ -107,7 +107,7 @@ class EntityCache
107
107
 
108
108
  internal_store.put(record)
109
109
 
110
- logger.debug { "Restored entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
110
+ logger.debug(tag: :cache) { "Restored entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
111
111
 
112
112
  record
113
113
  end
@@ -2,7 +2,6 @@ class EntityCache
2
2
  class Log < ::Log
3
3
  def tag!(tags)
4
4
  tags << :entity_cache
5
- tags << :cache
6
5
  tags << :library
7
6
  tags << :verbose
8
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-entity_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0.1
4
+ version: 0.16.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project