scrivito_sdk 1.4.1.rc1 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/ca-bundle.crt +1 -1
- data/lib/scrivito/backend/content_state_node.rb +4 -14
- data/lib/scrivito/backend/obj_data_cache.rb +18 -22
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f89019184f21b4bdfa167ae1a20c755a41bd7094
|
4
|
+
data.tar.gz: e2e24931a530ee482d43383a014fb9aff47fcb32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13376090043889af634c6085c5d0751c2cfcb29a4127656001f98b7f573fed3923641097592a832a78701825bf1f30bc8706ff9c2ba5355564738725732ec819
|
7
|
+
data.tar.gz: cf8f20a0c9ce6b03146acd51870c93b07d51b05233b6132c327de4dfb7bc98bdb1bc0f71e814689b8ccf7a81e948f93c3174de973bcfb7029911e198d0303d52
|
data/config/ca-bundle.crt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##
|
2
2
|
## Bundle of CA Root Certificates
|
3
3
|
##
|
4
|
-
## Certificate data from Mozilla as of:
|
4
|
+
## Certificate data from Mozilla as of: Fri Jul 8 12:28:41 2016
|
5
5
|
##
|
6
6
|
## This is a bundle of X.509 certificates of public Certificate Authorities
|
7
7
|
## (CA). These were automatically extracted from Mozilla's root certificates
|
@@ -64,26 +64,16 @@ class ContentStateNode < Struct.new(:content_state_id)
|
|
64
64
|
|
65
65
|
# the most recent nodes are considered unstable,
|
66
66
|
# since they may "disappear" from the tree when nodes are compacted.
|
67
|
+
# nodes without predecessor are always considered stable, since they
|
68
|
+
# cannot be compacted.
|
67
69
|
def next_stable_node
|
68
|
-
|
69
|
-
predecessor
|
70
|
-
else
|
71
|
-
self
|
72
|
-
end
|
70
|
+
predecessor || self
|
73
71
|
end
|
74
72
|
|
75
73
|
private
|
76
74
|
|
77
|
-
# nodes without predecessor cannot be compacted, by definition.
|
78
|
-
# nodes with changes that can no longer be expanded also aren't compacted de-facto,
|
79
|
-
# since it's no longer possible to update outdated query results.
|
80
|
-
def compactable?
|
81
|
-
predecessor && ObjDataCache.expand_changes_index(changes)
|
82
|
-
end
|
83
|
-
memoize :compactable?
|
84
|
-
|
85
75
|
def write_successor(successor_content_state_id, successor_changes)
|
86
|
-
if
|
76
|
+
if predecessor
|
87
77
|
# try to built a compacted node,
|
88
78
|
# i.e. create a new node by mering the new changes and the
|
89
79
|
# changes from this node (similar to git "squashing" commits)
|
@@ -41,15 +41,6 @@ module ObjDataCache
|
|
41
41
|
Hash[obj_ids.zip(tags)]
|
42
42
|
end
|
43
43
|
|
44
|
-
# accepts a "change index" (id --> tag), looks up each
|
45
|
-
# tag in the cache and return an "expanded index" (id --> data).
|
46
|
-
# return `nil` if any tag cannot be found in the cache.
|
47
|
-
def self.expand_changes_index(change_index)
|
48
|
-
# using "merge(self)" to map over a hash
|
49
|
-
change_index.merge(change_index) do |id, tag|
|
50
|
-
CmsDataCache.read_data_from_tag(tag) or return nil
|
51
|
-
end
|
52
|
-
end
|
53
44
|
|
54
45
|
class SimpleCacheView < Struct.new(:cache_id)
|
55
46
|
|
@@ -107,7 +98,7 @@ module ObjDataCache
|
|
107
98
|
|
108
99
|
return nil unless updated_result
|
109
100
|
|
110
|
-
|
101
|
+
if cached_at != stable_csid
|
111
102
|
write_cache_updatable(index, key, updated_result)
|
112
103
|
end
|
113
104
|
|
@@ -146,7 +137,7 @@ module ObjDataCache
|
|
146
137
|
|
147
138
|
return nil unless updated_tag
|
148
139
|
|
149
|
-
|
140
|
+
if cached_at != stable_csid
|
150
141
|
write_cache_updatable("id", id, updated_tag)
|
151
142
|
end
|
152
143
|
|
@@ -164,17 +155,7 @@ module ObjDataCache
|
|
164
155
|
|
165
156
|
private
|
166
157
|
|
167
|
-
# is the given csid reachable with at most one ContentStateNode traversal?
|
168
|
-
def recent?(csid)
|
169
|
-
return true if csid == viewed_state.content_state_id
|
170
|
-
|
171
|
-
predecessor = viewed_state.predecessor
|
172
|
-
|
173
|
-
predecessor && csid == predecessor.content_state_id
|
174
|
-
end
|
175
|
-
|
176
158
|
def write_cache_updatable(index, key, data, **options)
|
177
|
-
stable_csid = viewed_state.next_stable_node.content_state_id
|
178
159
|
write_cache(index, key, stable_csid, data, **options)
|
179
160
|
end
|
180
161
|
|
@@ -196,13 +177,28 @@ module ObjDataCache
|
|
196
177
|
|
197
178
|
return nil if change_index == ContentStateNode::CACHE_MISS
|
198
179
|
|
199
|
-
expanded_index =
|
180
|
+
expanded_index = expand_index(change_index)
|
200
181
|
|
201
182
|
# if the data of changed objs was evicted, treat as cache-miss
|
202
183
|
return nil if !expanded_index
|
203
184
|
|
204
185
|
update_function.call(key, cached_result, expanded_index)
|
205
186
|
end
|
187
|
+
|
188
|
+
# accepts a "change index" (id --> tag), looks up each
|
189
|
+
# tag in the cache and return an "expanded index" (id --> data).
|
190
|
+
# return `nil` if any tag cannot be found in the cache.
|
191
|
+
def expand_index(change_index)
|
192
|
+
# using "merge(self)" to map over a hash
|
193
|
+
change_index.merge(change_index) do |id, tag|
|
194
|
+
CmsDataCache.read_data_from_tag(tag) or return nil
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
def stable_csid
|
199
|
+
viewed_state.next_stable_node.content_state_id
|
200
|
+
end
|
201
|
+
|
206
202
|
end
|
207
203
|
|
208
204
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.1
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Infopark AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -422,9 +422,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
422
422
|
version: 2.1.0
|
423
423
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
424
424
|
requirements:
|
425
|
-
- - "
|
425
|
+
- - ">="
|
426
426
|
- !ruby/object:Gem::Version
|
427
|
-
version:
|
427
|
+
version: '0'
|
428
428
|
requirements: []
|
429
429
|
rubyforge_project:
|
430
430
|
rubygems_version: 2.4.5
|