seo_cache 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a025198e97eaad8a73126dbbdefdc559563add982f0cbeae20c56fb9f05a1ef4
4
- data.tar.gz: 94a3dabdc94052d6830af5a32e44799485fcba7d5ef63a4e6e90b40f3dd556ce
3
+ metadata.gz: a72e3a9ce91ed9a97bd3ab142805b3868a37dd565dabdc3b7d5fe956c7b7be6f
4
+ data.tar.gz: 7187dcb3ed4f2987a769667b19df906b30b135d2f6778255a25b1f081002033b
5
5
  SHA512:
6
- metadata.gz: c3e952a05d489b1f449ee39e343d0732e0c882829e09ec2b5cadfe430f5d34d7a924c89754d4536164d1a3d897203ef1af4a580bae576dfbdd5a516583f5a08b
7
- data.tar.gz: c4b4fb074b52e84d88f3f5b2aef39301b84989a4b66c02d19b61f21730f81062bfce934bac21ee067b0ef8d72a700005bd72885ab78cce08a3e927985c8bf25a
6
+ metadata.gz: '009557670cd549d512d14807e18417b5729f11a8969c8d9d4b42282ec1dd697bc0b70cd7e245204370529c4d548ab97e91e87eb7d4229408b131f8786c26ba1e'
7
+ data.tar.gz: 2690dc545eee091d27662489cacc1294ad3aef65b3ab77fe5f96666fad964595e7ae254722fe6dc618d740f82b475da64195de4981e39da13f63a0bba1c705b1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.3.0
2
+
3
+ - Add new option for Redis: redis_db_index
4
+
1
5
  ## 1.2.2
2
6
 
3
7
  - Update Ruby version for Travis testing
data/README.md CHANGED
@@ -86,12 +86,18 @@ Redis URL (**required** if memory cache):
86
86
  SeoCache.redis_url = "redis://localhost:6379/"
87
87
  ```
88
88
 
89
- Redis prefix:
89
+ Redis prefix (if needed):
90
90
 
91
91
  ```ruby
92
92
  SeoCache.redis_namespace = '_my_project:seo_cache'
93
93
  ```
94
94
 
95
+ Redis database index (if needed):
96
+
97
+ ```ruby
98
+ SeoCache.redis_db_index = 1
99
+ ```
100
+
95
101
  Waiting time before the page is fully loaded (optional in sec, useful for async elements):
96
102
 
97
103
  ```ruby
@@ -10,7 +10,7 @@ module SeoCache
10
10
 
11
11
  def initialize_memory_cache
12
12
  uri = URI.parse(SeoCache.redis_url)
13
- @redis = Redis::Namespace.new(SeoCache.redis_namespace, redis: Redis.new(host: uri.host, port: uri.port, password: uri.password, connect_timeout: 1, timeout: 1), warnings: false)
13
+ @redis = Redis::Namespace.new(SeoCache.redis_namespace, redis: Redis.new(host: uri.host, port: uri.port, password: uri.password, db: SeoCache.redis_db_index, connect_timeout: 1, timeout: 1), warnings: false)
14
14
  end
15
15
 
16
16
  def get(path, locale_domain = nil, extension = nil)
@@ -1,3 +1,3 @@
1
1
  module SeoCache
2
- VERSION = '1.2.2'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
data/lib/seo_cache.rb CHANGED
@@ -34,6 +34,9 @@ module SeoCache
34
34
  mattr_accessor :redis_url
35
35
  self.redis_url = 'redis://localhost:6379/'
36
36
 
37
+ mattr_accessor :redis_db_index
38
+ self.redis_db_index = 0
39
+
37
40
  mattr_accessor :redis_namespace
38
41
  self.redis_namespace = '_seo_cache:'
39
42
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seo_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FloXcoder
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-01 00:00:00.000000000 Z
11
+ date: 2023-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -214,7 +214,7 @@ homepage: https://github.com/floXcoder/seo_cache
214
214
  licenses:
215
215
  - MIT
216
216
  metadata: {}
217
- post_install_message:
217
+ post_install_message:
218
218
  rdoc_options: []
219
219
  require_paths:
220
220
  - lib
@@ -229,8 +229,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  - !ruby/object:Gem::Version
230
230
  version: '0'
231
231
  requirements: []
232
- rubygems_version: 3.3.5
233
- signing_key:
232
+ rubygems_version: 3.4.2
233
+ signing_key:
234
234
  specification_version: 4
235
235
  summary: Cache dedicated for SEO with Javascript rendering
236
236
  test_files: []