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 +4 -4
- data/lib/entity_cache/entity_cache.rb +8 -8
- data/lib/entity_cache/log.rb +1 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 838c6018a8001308f99a54902b70f8d37581419a385ff4536c111c9eb28f3ad4
|
4
|
+
data.tar.gz: 237181829497f38436f2f2f83d272b9f2f24ef881c3233f4c099847ec3b8d9c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: :
|
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(
|
55
|
+
logger.info(tags: [:get, :miss]) { "Cache miss getting entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
|
56
56
|
else
|
57
|
-
logger.info(tag: :
|
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: :
|
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: :
|
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: :
|
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: :
|
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: :
|
112
|
+
logger.debug(tag: :restore) { "Restored entity (ID: #{id.inspect}, #{Record::LogText.get(record)})" }
|
113
113
|
|
114
114
|
record
|
115
115
|
end
|
data/lib/entity_cache/log.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-configure
|