redis_page 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eac7f5554083beb01b6bd84ddf53940c6d7d7a30
4
- data.tar.gz: f9f64fe38c96790ab738312cfee0cf736f570328
3
+ metadata.gz: b8596548ecfa19e197f56e74f3f403e77c0b9115
4
+ data.tar.gz: 4ce725f85a9d4314c79fbf47694b76d6f7b693cf
5
5
  SHA512:
6
- metadata.gz: e19e0200315bdbe028ed85d0ee657fb86d0df72863fa45d82d00cc8548b09050ab812ac5fab9334d86b1fe43a8954dbb4cd0799ba6e8619a4b068fca66dce3f9
7
- data.tar.gz: d5f2fa012f3fdfc29d7f52af398db1377c8c029f0286af2b2be01f10d3cf551f0ad883f831aab030f1cd7cefe098759c70acc9fad30b04a105193668fd310d3d
6
+ metadata.gz: 338b11c2a01ce06d708c06013f28bf43657b983f1a553eb740306f010394d74313c1442dd48dfcaf44dcb949cea3cacc12d184b8ca4278a9e7f49ad71eb49a93
7
+ data.tar.gz: 725bd98b8d926bd8e93d1b93fe6dde4555778a4d1b9e8e0ca158a44c5239c2a2cf2004c453a0e8ad66941737d566114f492687925427de36e5f6b8fa1c4dc53d
@@ -25,7 +25,8 @@ module ActionController
25
25
 
26
26
  after_filter({only: actions}.merge(options)) do |c|
27
27
  #path = request.path # fixed: /products/ 地址带了/符号,缓存不生效
28
- path = URI(request.original_url).path
28
+ #path = URI(request.original_url).path
29
+ path = request.path
29
30
  path = "#{path}-#{@cache_country}" if @cache_country
30
31
  c.cache_redis_page(response.body, path, options)
31
32
  c.record_cached_page
@@ -1,3 +1,3 @@
1
1
  module RedisPage
2
- VERSION = '0.1.14'
2
+ VERSION = '0.1.15'
3
3
  end
@@ -22,14 +22,14 @@ module RedisPage
22
22
  id = object.id
23
23
  end
24
24
  Rails.logger.info "[page cache]record: #{name}##{id}"
25
- RedisPage.redis.sadd("i:#{name}:#{id}", { url: request.url, country: @cache_country }.to_json)
25
+ RedisPage.redis.sadd("i:#{name}:#{id}", { url: request.base_url + request.path, country: @cache_country }.to_json)
26
26
  end
27
27
 
28
28
  # 记录类相关的页面,方便实体创建时,刷新页面缓存
29
29
  def mark_cache_clazz(clazz)
30
30
  name = clazz.table_name
31
31
  Rails.logger.info "[page cache]class: #{name}"
32
- RedisPage.redis.sadd("c:#{name}", { url: request.url, country: @cache_country }.to_json)
32
+ RedisPage.redis.sadd("c:#{name}", { url: request.base_url + request.path, country: @cache_country }.to_json)
33
33
  end
34
34
 
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_page
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - saberma