caboose-cms 0.5.38 → 0.5.39
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTM4MThkNGM4MGVkMzNhYmJhYmI4MmQ3MWEzNzc3YmRjOGRmM2EwOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmRlNzkwYTU4ZGU3OWQ5MGVkNDIwMjdmMjYxOWVjNzRiYmQyOTBjNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWEwNDFjNDY0NTU2OTQxYjE1NmM1MDcwMjE5YmM5NWU2MDg3OGRlNTNkYzc1
|
10
|
+
ZWI5NzYyNTM2ZmQwYmYxODBhOWY2ZDJhNDc4YjkwMjQwNmUzMmE4MDJkZjFk
|
11
|
+
ZjI3M2NkYjRlOThhZmRmODE5MTBmNDBkYThmM2UxMjVlMzNhMzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTQ2ZTc3Mjk4MGU3YWY2MjU4MTYxMzk2YTE2YWEzODY5ZWU5MWQ3MjM0YTFl
|
14
|
+
ZDQ0ZGExYzU1NDJmMmE5ZDE3ZWZjOGZmNjEzMDY3NmQ4YjcxNDhiZjQ0Y2Y0
|
15
|
+
ZmFhZjE3MzhkNmI3MWMyYzZmN2IyYTUzNTgyMTI1OTAxOWYxNTM=
|
@@ -125,6 +125,11 @@ module Caboose
|
|
125
125
|
when 'site_id' then bt.toggle_site(v[0], v[1])
|
126
126
|
end
|
127
127
|
end
|
128
|
+
|
129
|
+
# Trigger the page cache to be updated
|
130
|
+
query = ["update page_cache set refresh = true where page_id in (select distinct(page_id) from blocks where block_type_id = ?)", bt.id]
|
131
|
+
ActiveRecord::Base.connection.execute(ActiveRecord::Base.send(:sanitize_sql_array, query))
|
132
|
+
PageCacher.delay.refresh
|
128
133
|
|
129
134
|
resp.success = save && bt.save
|
130
135
|
render :json => resp
|
@@ -287,7 +287,15 @@ module Caboose
|
|
287
287
|
end
|
288
288
|
end
|
289
289
|
end
|
290
|
-
|
290
|
+
|
291
|
+
# Trigger the page cache to be updated
|
292
|
+
pc = PageCache.where(:page_id => b.page_id).first
|
293
|
+
if pc
|
294
|
+
pc.refresh = true
|
295
|
+
pc.save
|
296
|
+
PageCacher.delay.refresh
|
297
|
+
end
|
298
|
+
|
291
299
|
resp.success = save && b.save
|
292
300
|
b.create_children
|
293
301
|
render :json => resp
|
@@ -2,6 +2,12 @@
|
|
2
2
|
module Caboose
|
3
3
|
class PageCacher
|
4
4
|
|
5
|
+
def self.refresh
|
6
|
+
PageCache.where(:refresh => true).all.each do |pc|
|
7
|
+
self.delay.cache(pc.page_id)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
5
11
|
def self.cache_all
|
6
12
|
Page.reorder(:id).all.each do |p|
|
7
13
|
puts "Caching #{p.title}..."
|
@@ -50,6 +56,7 @@ module Caboose
|
|
50
56
|
pc = PageCache.new(:page_id => p.id) if pc.nil?
|
51
57
|
pc.render_function = str
|
52
58
|
pc.block = Marshal.dump(BlockCache.new(p.block))
|
59
|
+
pc.refresh = false
|
53
60
|
pc.save
|
54
61
|
end
|
55
62
|
|
data/lib/caboose/version.rb
CHANGED