caboose-cms 0.5.40 → 0.5.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/page_cacher.rb +9 -1
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjUyMzA2NmM2MDFkZDAyY2ViZjc4NjAwOWQwZTFjYjQ2MWJhNGVmNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjIwYjE1MmFiNTJkYmIxZmU1NWEyM2JhM2YwYjViNjM0NGYxYWVkNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTZiZGY1NWY2ZDliZTVjMzA1NmMyOWFmOTQ4M2RjZTAzNzhmZmY0Y2Q2OGJj
|
10
|
+
ODMzMjEzMGU1YjZhMjkzNDNjYTI2MmJhMWQwM2I5ZGQ5ZGYzZTg1ZGU3ZDkz
|
11
|
+
Y2FjMGFkNGZhNjQ4ODc5ZmU2MjMzMWQ5MGY4NzA2OWI4YmU3ODA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGVlNTQwYWE5YmFhOWUwYmM1ZjgyYWU5MWFjM2MyNmIzNDBhNGIxMDQ3NGYw
|
14
|
+
NDQxMjA2YTdjYjg1NzkwMTI3ODVmOGEyNzdiODNkNGJjZDk2MWM5OWM5YTNl
|
15
|
+
YmExN2Y0ZmJiYmNhODE4ZjRiYTZkYzdkOTk2NDk2YTk3ZGVkOTg=
|
@@ -5,7 +5,14 @@ module Caboose
|
|
5
5
|
def self.refresh
|
6
6
|
PageCache.where(:refresh => true).all.each do |pc|
|
7
7
|
self.delay.cache(pc.page_id)
|
8
|
-
end
|
8
|
+
end
|
9
|
+
|
10
|
+
# Make sure all pages are cached
|
11
|
+
query = ["select id from pages where id not in (select distinct(page_id) from page_cache"]
|
12
|
+
rows = ActiveRecord::Base.connection.execute(ActiveRecord::Base.send(:sanitize_sql_array, query))
|
13
|
+
if rows
|
14
|
+
rows.each{ |row| self.delay.cache(row['id']) }
|
15
|
+
end
|
9
16
|
end
|
10
17
|
|
11
18
|
def self.cache_all
|
@@ -19,6 +26,7 @@ module Caboose
|
|
19
26
|
p = (page_id.is_a?(Integer) ? Page.where(:id => page_id).first : page_id)
|
20
27
|
return if p.nil?
|
21
28
|
return if p.site_id.nil?
|
29
|
+
return if p.site.nil?
|
22
30
|
return if p.block.nil?
|
23
31
|
|
24
32
|
@render_functions = {} if @render_functions.nil?
|
data/lib/caboose/version.rb
CHANGED