seo_cache 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/seo_cache/populate_cache.rb +12 -4
- data/lib/seo_cache/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83f6cd5dea18efdc9fa21ae62d13478b556aa7f35bcbd7789db640d8db4419ca
|
4
|
+
data.tar.gz: 06a5e2de7fc435fae27f53f74d7741db2e9a4f8ac9bd0c0112bba52c2c8876e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dd2858594c6acfe05385f336ab60a74fecaccd6e97bdb66c62ccf23beda09f961b67192f2d6d13e665a43dbceb59626700483cde5b739cdbbb8642811e32b3c
|
7
|
+
data.tar.gz: 0f17ee53fde5bfec13904da5533dae7743cfbe50b2a1827247d2dd314cf7d8cf2cc8cb7d284cfdf2577f585bffb96760b67c4a8de02604e8d8f815646bc2e79b
|
data/CHANGELOG.md
CHANGED
@@ -6,9 +6,9 @@ require 'seo_cache/page_render'
|
|
6
6
|
module SeoCache
|
7
7
|
class PopulateCache
|
8
8
|
def initialize(host, paths, options = {})
|
9
|
-
@host
|
10
|
-
@paths
|
11
|
-
@page_render
|
9
|
+
@host = host
|
10
|
+
@paths = paths
|
11
|
+
@page_render = PageRender.new
|
12
12
|
@page_caching = PageCaching.new
|
13
13
|
|
14
14
|
@force_cache = options.fetch(:force_cache, false)
|
@@ -18,7 +18,15 @@ module SeoCache
|
|
18
18
|
@paths.each do |path|
|
19
19
|
next if @page_caching.cache_exists?(path) && !@force_cache
|
20
20
|
|
21
|
-
|
21
|
+
url = @host + path
|
22
|
+
url += if path.url.end_with?('?')
|
23
|
+
'&'
|
24
|
+
else
|
25
|
+
'?'
|
26
|
+
end
|
27
|
+
url += "#{SeoCache.prerender_url_param}=true"
|
28
|
+
|
29
|
+
page_source = @page_render.get(url, false)
|
22
30
|
@page_caching.cache(page_source, path)
|
23
31
|
end
|
24
32
|
|
data/lib/seo_cache/version.rb
CHANGED
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: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FloXcoder
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
- !ruby/object:Gem::Version
|
227
227
|
version: '0'
|
228
228
|
requirements: []
|
229
|
-
rubygems_version: 3.
|
229
|
+
rubygems_version: 3.1.2
|
230
230
|
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: Cache dedicated for SEO with Javascript rendering
|