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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDM4NmVmNzY4MDhiMjU0NzM1NmZhM2EzODg2MTRhZmI4NmQ4ZDI4Ng==
4
+ MjUyMzA2NmM2MDFkZDAyY2ViZjc4NjAwOWQwZTFjYjQ2MWJhNGVmNQ==
5
5
  data.tar.gz: !binary |-
6
- Y2UyMjRlNDU2Nzc5Y2QzMDUwMDZkMzg2ZTBiOGU1M2I2YjgxM2UxMQ==
6
+ MjIwYjE1MmFiNTJkYmIxZmU1NWEyM2JhM2YwYjViNjM0NGYxYWVkNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDUyMGI1MWNhNGNiODliNjU4ZTlmYWM0MjBlMWI3YzIwMTZhMzYzODdkNzU1
10
- MTA0Mjg2NmNkZjYyMDNiOWM4OGFmZGZjNmNjYjZhNGNlZDFlNjU4MTFkNGNj
11
- M2JjZDRkOWU1NTIwYWU0YWIyNjM2MDVkM2ViOGU4NGFiOThmM2E=
9
+ ZTZiZGY1NWY2ZDliZTVjMzA1NmMyOWFmOTQ4M2RjZTAzNzhmZmY0Y2Q2OGJj
10
+ ODMzMjEzMGU1YjZhMjkzNDNjYTI2MmJhMWQwM2I5ZGQ5ZGYzZTg1ZGU3ZDkz
11
+ Y2FjMGFkNGZhNjQ4ODc5ZmU2MjMzMWQ5MGY4NzA2OWI4YmU3ODA=
12
12
  data.tar.gz: !binary |-
13
- NzYwNzFmMjViMzkxNThiZGFkNjM0MjJlYjQ0YWY3ODA4OWZmODRiM2MyYTA2
14
- NDhmYTZiNTU3YTU1MGU1NDI1MzgxY2Q5ZjBiZDliODMzMWI0YmY3NDkwYzA1
15
- MDIxY2Y3NWM1ZTc5YzA2MjkyMDIxZmM4MzdjYmM2NjRiYWQxMDI=
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?
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.40'
2
+ VERSION = '0.5.41'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.40
4
+ version: 0.5.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry