caddy 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/changelog.md +31 -0
- data/lib/caddy/cache.rb +1 -0
- data/lib/caddy/version.rb +1 -1
- data/test/caddy_test.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53c6371c7ae4a7d4187d15a3e001e54956038497
|
4
|
+
data.tar.gz: 065bb3be46129e37bc971db5be7bf5de573064b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03ea3bd82390a146981ee37b90e6215481e47775c5e6ffa1257bb07349d49a05cb6396373566f1fcf4807eda93a89ec3fe6ee79826ac5252de017fa559768731
|
7
|
+
data.tar.gz: 8f5002ebd4b6ddec46535225a1ce1f4c20602a601c1673bc46a40f2d51744f929d8e83cd8977feab04d3d61bd37cc54193226ee9ce35a849a07a8f8fee536746
|
data/README.md
CHANGED
@@ -38,7 +38,9 @@ end
|
|
38
38
|
|
39
39
|
## Error handling
|
40
40
|
|
41
|
-
As Caddy refreshers are run in threads, exceptions are not normally reported (except by default in the logs).
|
41
|
+
As Caddy refreshers are run in threads, exceptions are not normally reported (except by default in the logs). If your refresher errors out (or times out, which can happen if your refresher takes as long as your refresh interval to run) your error handler will be called and the cache value will remain what it was before it errored. This means your application may use stale values until your refresher stops erroring.
|
42
|
+
|
43
|
+
To add a programmatic error handler:
|
42
44
|
|
43
45
|
```ruby
|
44
46
|
Caddy[:flags].refresher = -> { SomeFlagService.fetch_flags }
|
data/changelog.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
## 1.5.1
|
2
|
+
|
3
|
+
- Add back in alerting if you attempt to load a cache before the refresher has run.
|
4
|
+
- Improve documentation on error handling.
|
5
|
+
|
6
|
+
## 1.5.0
|
7
|
+
|
8
|
+
- Support for multiple cache stores, like: `Caddy[:foo][:baz]` instead of just `Caddy[:baz]`
|
9
|
+
- Additional tests.
|
10
|
+
- Additional documentation for the new feature.
|
11
|
+
|
12
|
+
## 1.0.1
|
13
|
+
|
14
|
+
- More tests.
|
15
|
+
- Stop caching nil values returned after refreshers timeout or throw an exception (fall back on the last cached value).
|
16
|
+
- Additional documentation.
|
17
|
+
|
18
|
+
## 1.0.0
|
19
|
+
|
20
|
+
- First draft of tests.
|
21
|
+
- More clean & refactoring.
|
22
|
+
- Style guide.
|
23
|
+
- Documentation.
|
24
|
+
|
25
|
+
## 0.0.2
|
26
|
+
|
27
|
+
- Code cleanup, refactoring.
|
28
|
+
|
29
|
+
## 0.0.1
|
30
|
+
|
31
|
+
- First release.
|
data/lib/caddy/cache.rb
CHANGED
@@ -19,6 +19,7 @@ module Caddy
|
|
19
19
|
|
20
20
|
def cache
|
21
21
|
raise "Please run `Caddy.start` before attempting to access the cache" unless @task && @task.running?
|
22
|
+
raise "Caddy cache access before initial load; allow some more time for your app to start up" unless @cache
|
22
23
|
|
23
24
|
@cache
|
24
25
|
end
|
data/lib/caddy/version.rb
CHANGED
data/test/caddy_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Elser
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- README.md
|
83
83
|
- Rakefile
|
84
84
|
- caddy.gemspec
|
85
|
+
- changelog.md
|
85
86
|
- docs/architecture.dot
|
86
87
|
- docs/architecture.svg
|
87
88
|
- lib/caddy.rb
|