cache-flow 0.0.6 → 0.0.7
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/Gemfile.lock +6 -3
- data/Readme.markdown +2 -2
- data/cache-flow.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb0d70670910bec3b1a91baed1ceccb03074dcd2
|
4
|
+
data.tar.gz: 3e1e93d8a26d0d8427069ff957258ecc43be7596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852011d4abbdca88bd3dd2ff928623485ed993a4c5ee00be835c63535629ec8520b2d34307c2cebabddd2e0bd47caf090e97f988a71b2e7df4bf5a63c889ec49
|
7
|
+
data.tar.gz: 3ff8d6439aca0bda2d632bfb01c04538778b114f388edb8504d43de78bee7d2fb27fb24e2f24f2c11d2f4c532e88e91df23a3ed650bda8b2231b6aebe62678d3
|
data/Gemfile.lock
CHANGED
@@ -3,14 +3,14 @@ PATH
|
|
3
3
|
specs:
|
4
4
|
cache-flow (0.0.6)
|
5
5
|
activesupport (>= 3.1.0)
|
6
|
-
i18n (
|
6
|
+
i18n (>= 0.6.9)
|
7
7
|
tzinfo (= 0.3.38)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (4.0.
|
13
|
-
i18n (~> 0.6, >= 0.6.
|
12
|
+
activesupport (4.0.3)
|
13
|
+
i18n (~> 0.6, >= 0.6.4)
|
14
14
|
minitest (~> 4.2)
|
15
15
|
multi_json (~> 1.3)
|
16
16
|
thread_safe (~> 0.1)
|
@@ -41,3 +41,6 @@ PLATFORMS
|
|
41
41
|
DEPENDENCIES
|
42
42
|
cache-flow!
|
43
43
|
rspec (= 3.2.0)
|
44
|
+
|
45
|
+
BUNDLED WITH
|
46
|
+
1.10.4
|
data/Readme.markdown
CHANGED
@@ -37,7 +37,7 @@ end
|
|
37
37
|
|
38
38
|
So what does Cache Flow do? It generates a random expiration time in between the range of time you configured from now (random time in the future in between your defined range - Time.now.to_i). The Rails cache `expires_in` option accepts a number that is seconds from now that the cache should expire so we chose 1-4am PST for the defined range of when we want our cache to expire since our server's traffic load is light during that window of time.
|
39
39
|
|
40
|
-
### Background - Straight Cache
|
40
|
+
### Background - Straight Cache Homie
|
41
41
|
To understand the problem Cache Flow is solving, it's helpful to under [how caching works in Rails](http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html). There are two common cache busting techniques for the Rails cache store. The first is to use a dynamic cache key that busts itself. Example:
|
42
42
|
`Rails.cache.fetch("item-path-#{self.id}-#{Date.today.to_s}") { UrlBuilder.new(self).build }`
|
43
43
|
|
@@ -73,7 +73,7 @@ Rails.cache.fetch("any_unique_key", expires_in: 3.minutes) { buster_bluth }
|
|
73
73
|
# I'm a monster!
|
74
74
|
# => "Hey Brother"
|
75
75
|
```
|
76
|
-
This is why Cache Flow was created. We wanted to utilize `expires_in` functionality to manage when our cache busts in a predictable way. With Cache Flow, you don't have to worry about when your cache store will bust - you just let Cache Flow take care of that. Straight cache,
|
76
|
+
This is why Cache Flow was created. We wanted to utilize `expires_in` functionality to manage when our cache busts in a predictable way. With Cache Flow, you don't have to worry about when your cache store will bust - you just let Cache Flow take care of that. Straight cache, homie.
|
77
77
|
|
78
78
|

|
79
79
|
|
data/cache-flow.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'cache-flow'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.7'
|
4
4
|
s.date = '2014-06-18'
|
5
5
|
s.summary = 'A gem to manage when your cache expires.'
|
6
6
|
s.description = 'Define a window of time to have all your cache expire randomly within.'
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.homepage = 'https://github.com/dandemeyere/cache-flow'
|
11
11
|
s.license = 'MIT'
|
12
12
|
s.add_dependency('activesupport','>= 3.1.0')
|
13
|
-
s.add_dependency('i18n','0.
|
13
|
+
s.add_dependency('i18n', '>= 0.6.9')
|
14
14
|
s.add_dependency('tzinfo', '0.3.38')
|
15
15
|
s.add_development_dependency('rspec', '3.2.0')
|
16
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cache-flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan DeMeyere
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: i18n
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.6.9
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.6.9
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: tzinfo
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.4.8
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: A gem to manage when your cache expires.
|