stockpile_cache 1.0.0 → 1.0.1
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 +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +3 -1
- data/lib/stockpile/constants.rb +1 -1
- data/lib/stockpile/redis_connection.rb +8 -4
- data/stockpile-cache.gemspec +4 -3
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be776cc6d3422c9cf860af58b463cdbc72dff81c615511484e29e3d646b00ce4
|
|
4
|
+
data.tar.gz: ae98206437c01ed7b15a92a502450e4c31370822e5a003b74d2d177a0aafb2ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6aaf1c67c7593e9788bc595d9a42815e840714c70d63b70f7891e5aeb52a8d018e0b784fd0c2801b33fae3599e93e3874edf6478b1100b88aae31ef00d302547
|
|
7
|
+
data.tar.gz: a3ce357ee412fb2d01d695a75257b8eb7aac84b1b81a410b0debc80e555ad19ac80504e7c935de741f5a1bba9d97c68fb6faf2ed4afbd8a21f6142bca36dbdf4
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Stockpile [![Build Status][ci-image]][ci] [![Code Climate][codeclimate-image]][codeclimate]
|
|
1
|
+
# Stockpile [![Build Status][ci-image]][ci] [![Code Climate][codeclimate-image]][codeclimate] [![Gem Version][version-image]][version]
|
|
2
2
|
Stockpile is a simple cache written in Ruby backed by Redis. It has built in
|
|
3
3
|
[cache-stampede](https://en.wikipedia.org/wiki/Cache_stampede) (also known as
|
|
4
4
|
dog-piling) protection.
|
|
@@ -133,3 +133,5 @@ conduct](https://github.com/ConvertKit/stockpile_cache/blob/master/CODE_OF_CONDU
|
|
|
133
133
|
[ci-image]: https://circleci.com/gh/ConvertKit/stockpile_cache.svg?style=svg
|
|
134
134
|
[codeclimate]: https://codeclimate.com/github/ConvertKit/stockpile_cache/maintainability
|
|
135
135
|
[codeclimate-image]: https://api.codeclimate.com/v1/badges/f9ca3b6dda3b492b125e/maintainability
|
|
136
|
+
[version]: https://badge.fury.io/rb/stockpile_cache
|
|
137
|
+
[version-image]: https://badge.fury.io/rb/stockpile_cache.svg
|
data/lib/stockpile/constants.rb
CHANGED
|
@@ -29,13 +29,17 @@ module Stockpile
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def connection_options
|
|
32
|
-
{
|
|
33
|
-
|
|
32
|
+
{
|
|
33
|
+
url: redis_url,
|
|
34
|
+
sentinels: sentinels
|
|
35
|
+
}.delete_if { |_k, v| v.nil? || v.empty? }
|
|
34
36
|
end
|
|
35
37
|
|
|
36
38
|
def connection_pool_options
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
+
{
|
|
40
|
+
size: pool_size,
|
|
41
|
+
timeout: connection_timeout
|
|
42
|
+
}
|
|
39
43
|
end
|
|
40
44
|
|
|
41
45
|
def connection_timeout
|
data/stockpile-cache.gemspec
CHANGED
|
@@ -11,11 +11,12 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.authors = ['ConvertKit, LLC']
|
|
12
12
|
spec.email = ['engineering@convertkit.com']
|
|
13
13
|
|
|
14
|
-
spec.summary = '
|
|
15
|
-
spec.description = '
|
|
16
|
-
spec.homepage = 'https://convertkit.com'
|
|
14
|
+
spec.summary = 'Redis based cache'
|
|
15
|
+
spec.description = 'Simple redis based cache with stampede protection'
|
|
17
16
|
spec.license = 'Apache License Version 2.0'
|
|
18
17
|
|
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/ConvertKit/stockpile_cache'
|
|
19
|
+
|
|
19
20
|
spec.files = `git ls-files | grep -Ev '^(spec)'`.split("\n")
|
|
20
21
|
|
|
21
22
|
spec.executables = ['console']
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stockpile_cache
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ConvertKit, LLC
|
|
@@ -66,7 +66,7 @@ dependencies:
|
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
|
-
description:
|
|
69
|
+
description: Simple redis based cache with stampede protection
|
|
70
70
|
email:
|
|
71
71
|
- engineering@convertkit.com
|
|
72
72
|
executables:
|
|
@@ -78,6 +78,7 @@ files:
|
|
|
78
78
|
- ".gitignore"
|
|
79
79
|
- ".rspec"
|
|
80
80
|
- ".rubocop.yml"
|
|
81
|
+
- CHANGELOG.md
|
|
81
82
|
- CODE_OF_CONDUCT.md
|
|
82
83
|
- Gemfile
|
|
83
84
|
- Gemfile.lock
|
|
@@ -98,10 +99,11 @@ files:
|
|
|
98
99
|
- lib/stockpile/redis_connection.rb
|
|
99
100
|
- lib/stockpile_cache.rb
|
|
100
101
|
- stockpile-cache.gemspec
|
|
101
|
-
homepage:
|
|
102
|
+
homepage:
|
|
102
103
|
licenses:
|
|
103
104
|
- Apache License Version 2.0
|
|
104
|
-
metadata:
|
|
105
|
+
metadata:
|
|
106
|
+
source_code_uri: https://github.com/ConvertKit/stockpile_cache
|
|
105
107
|
post_install_message:
|
|
106
108
|
rdoc_options: []
|
|
107
109
|
require_paths:
|
|
@@ -120,5 +122,5 @@ requirements: []
|
|
|
120
122
|
rubygems_version: 3.0.3
|
|
121
123
|
signing_key:
|
|
122
124
|
specification_version: 4
|
|
123
|
-
summary:
|
|
125
|
+
summary: Redis based cache
|
|
124
126
|
test_files: []
|