atomic_cache 0.2.0.rc2 → 0.2.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/PROJECT_SETUP.md +1 -1
- data/lib/atomic_cache/key/last_mod_time_key_manager.rb +1 -0
- data/lib/atomic_cache/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6587484871a77f213f41c540019fbb9e945b8eb5d759bbab2c535e1c1ba58ea
|
4
|
+
data.tar.gz: c1c4377f19df9b28321e5fb6214c8c687bcc9c6857d5b6843663aa068209b932
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe10e185b34e6b754329c96c37268fa2a66a81a768c0d8c00c32d462034d0eb4f55c709c7356c537c4fb1f5a0a053412f618c73896876da8b20f0279478dadc8
|
7
|
+
data.tar.gz: 1ab35be3c84aca48ea62194a3ec06e7481681989a36866304e4fa70f9a48eeb54d08c12ba344a0c85afc5f6a1773009ef47f414209c628d18d0956dd78297c80
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# atomic_cache Gem
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/atomic_cache.svg)](https://badge.fury.io/rb/atomic_cache)
|
3
|
-
[![Build Status](https://travis-ci.
|
3
|
+
[![Build Status](https://travis-ci.com/Ibotta/atomic_cache.svg?branch=main)](https://travis-ci.com/Ibotta/atomic_cache)
|
4
4
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/790faad5866d2a00ca6c/test_coverage)](https://codeclimate.com/github/Ibotta/atomic_cache/test_coverage)
|
5
5
|
|
6
6
|
## User Documentation
|
@@ -50,7 +50,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/ibotta
|
|
50
50
|
## Releasing
|
51
51
|
|
52
52
|
Releases are automatically handled via the Travis CI build. When a version greater than
|
53
|
-
the version published on rubygems.org is pushed to the `
|
53
|
+
the version published on rubygems.org is pushed to the `main` branch, Travis will:
|
54
54
|
|
55
55
|
- re-generate the CHANGELOG file
|
56
56
|
- tag the release with GitHub
|
data/docs/PROJECT_SETUP.md
CHANGED
@@ -36,7 +36,7 @@ Note that `Datadog::Statsd` is not _required_. Adding it, however, will enable
|
|
36
36
|
* `key_storage` - Storage adapter for key manager (see below)
|
37
37
|
|
38
38
|
#### Optional
|
39
|
-
* `default_options` - Default options for every fetch call. See [fetch options](/Ibotta/atomic_cache/blob/
|
39
|
+
* `default_options` - Default options for every fetch call. See [fetch options](/Ibotta/atomic_cache/blob/main/docs/USAGE.md#fetch).
|
40
40
|
* `logger` - Logger instance. Used for debug and warn logs. Defaults to nil.
|
41
41
|
* `timestamp_formatter` - Proc to format last modified time for storage. Defaults to timestamp (`Time.to_i`)
|
42
42
|
* `metrics` - Metrics instance. Defaults to nil.
|
@@ -55,6 +55,7 @@ module AtomicCache
|
|
55
55
|
# @param ttl [Numeric] the duration in ms to lock (auto expires after duration is up)
|
56
56
|
# @param options [Hash] options to pass to the storage adapter
|
57
57
|
def lock(keyspace, ttl, options={})
|
58
|
+
# returns false if the key already exists
|
58
59
|
@storage.add(keyspace.lock_key, LOCK_VALUE, ttl, options)
|
59
60
|
end
|
60
61
|
|
data/lib/atomic_cache/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atomic_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ibotta Developers
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -226,8 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
- !ruby/object:Gem::Version
|
227
227
|
version: 1.3.1
|
228
228
|
requirements: []
|
229
|
-
|
230
|
-
rubygems_version: 2.7.6
|
229
|
+
rubygems_version: 3.0.8
|
231
230
|
signing_key:
|
232
231
|
specification_version: 4
|
233
232
|
summary: summary
|