evt-entity_cache 0.18.2.1 → 0.18.2.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: 2b23cb05bfd47944b72bba658c3b1c9cf866488102c690b91ade4d44dd546dd2
4
- data.tar.gz: b64958a854a57a3d682d74715e7d17a5106a2f98d260841956b9405eee4455aa
3
+ metadata.gz: 838c6018a8001308f99a54902b70f8d37581419a385ff4536c111c9eb28f3ad4
4
+ data.tar.gz: 237181829497f38436f2f2f83d272b9f2f24ef881c3233f4c099847ec3b8d9c0
5
5
  SHA512:
6
- metadata.gz: 4d22153354d770a73949c268a910d6f060be5867623095a66a767c72d1e7795c726be33c0af29f689808a4b0a257b4ec5c7841c87cf4a67fb0c758674b963719
7
- data.tar.gz: cef720a96e81a23073afe8afe4d6775e6129e812c253ff336bd4ef5f5e5d4ef2e753f7095ec8471d380074893f7fa64602b1894ba9511efffca0d55dd8a5c1d4
6
+ metadata.gz: cf745d63db2be88cef416973a44e77e003e5a427448206552e7b78d936387e4831c1af0b5eb1393c06b26b88b1022119d9d4821799ef7f6cb192964d8c7f489d
7
+ data.tar.gz: db8262629ff5139f7714874ac75c509eab5cbb6dad50ff1e32f8eb9b22f639a1c8be6745f81f245af641b8b63dd661270cff10e625d01afb242380e496191d1d
@@ -43,7 +43,7 @@ class EntityCache
43
43
  end
44
44
 
45
45
  def get(id)
46
- logger.trace(tag: :cache) { "Get entity (ID: #{id.inspect})" }
46
+ logger.trace(tag: :get) { "Get entity (ID: #{id.inspect})" }
47
47
 
48
48
  record = internal_store.get(id)
49
49
 
@@ -52,9 +52,9 @@ class EntityCache
52
52
  end
53
53
 
54
54
  if record.nil?
55
- logger.info(tag: :cache) { "Cache miss getting entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
55
+ logger.info(tags: [:get, :miss]) { "Cache miss getting entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
56
56
  else
57
- logger.info(tag: :cache) { "Get entity done (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
57
+ logger.info(tag: [:get, :hit]) { "Get entity done (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
58
58
  end
59
59
 
60
60
  record
@@ -67,7 +67,7 @@ class EntityCache
67
67
 
68
68
  record = Record.build(id, entity, version, time)
69
69
 
70
- logger.trace(tag: :cache) { "Put entity (ID: #{id.inspect}, #{Record::LogText.get(record)}, Persist Interval: #{persist_interval.inspect})" }
70
+ logger.trace(tag: :put) { "Put entity (ID: #{id.inspect}, #{Record::LogText.get(record)}, Persist Interval: #{persist_interval.inspect})" }
71
71
 
72
72
  if persist?(version, persisted_version)
73
73
  external_store.put(id, entity, version, time)
@@ -82,18 +82,18 @@ class EntityCache
82
82
 
83
83
  internal_store.put(record)
84
84
 
85
- 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})" }
85
+ logger.info(tag: :put) { "Put entity done (ID: #{id.inspect}, #{Record::LogText.get(record)}, Persist Interval: #{persist_interval.inspect}, Updated External Store: #{updated_external_store})" }
86
86
 
87
87
  record
88
88
  end
89
89
 
90
90
  def restore(id)
91
- logger.trace(tag: :cache) { "Restoring entity (ID: #{id.inspect})" }
91
+ logger.trace(tag: :restore) { "Restoring entity (ID: #{id.inspect})" }
92
92
 
93
93
  entity, version, time = external_store.get(id)
94
94
 
95
95
  if entity.nil?
96
- logger.debug(tag: :cache) { "Could not restore entity. No entity record. (ID: #{id.inspect})" }
96
+ logger.debug(tag: :restore) { "Could not restore entity. No entity record. (ID: #{id.inspect})" }
97
97
 
98
98
  return nil
99
99
  end
@@ -109,7 +109,7 @@ class EntityCache
109
109
 
110
110
  internal_store.put(record)
111
111
 
112
- logger.debug(tag: :cache) { "Restored entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
112
+ logger.debug(tag: :restore) { "Restored entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
113
113
 
114
114
  record
115
115
  end
@@ -1,9 +1,7 @@
1
1
  class EntityCache
2
2
  class Log < ::Log
3
3
  def tag!(tags)
4
- tags << :entity_cache
5
- tags << :library
6
- tags << :verbose
4
+ tags << :cache
7
5
  end
8
6
  end
9
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-entity_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.2.1
4
+ version: 0.18.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-28 00:00:00.000000000 Z
11
+ date: 2018-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-configure