identity_cache 1.6.3 → 1.6.4
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/.github/dependabot.yml +6 -0
- data/.github/workflows/ci.yml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +41 -37
- data/identity_cache.gemspec +0 -1
- data/lib/identity_cache/query_api.rb +13 -4
- data/lib/identity_cache/version.rb +1 -1
- metadata +4 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1c4e1e77b3c4a778ba9a9b20540aa092a747ab19534cf6b49566bf74f02e5b7
|
|
4
|
+
data.tar.gz: 906ac8772c48e590b2dbacb2507319f04a97af51309fa01822461715ec503212
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a86b5918fbfa174f8d2d01626de61b7b3cfdef06690f0e4c0440be0e5615a74fd84cab6d7e6c7982dcbdc8811e76db3b7f6344f8e2a15dfad3ade11e2cf7e40
|
|
7
|
+
data.tar.gz: 31910c9568c5ead4d8157092933e31d76544e12dfdec5f74c6ac6f24ff9ca41d8bd1587e31e1fee63c0044fadb8ebac104e8854c4d36ceef5dc40b975c4e0f76
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -19,11 +19,11 @@ jobs:
|
|
|
19
19
|
ruby: '3.0'
|
|
20
20
|
gemfile: "Gemfile.min-supported"
|
|
21
21
|
- name: 'Latest released & run rubocop'
|
|
22
|
-
ruby: '3.
|
|
22
|
+
ruby: '3.4'
|
|
23
23
|
gemfile: "Gemfile.latest-release"
|
|
24
24
|
rubocop: true
|
|
25
25
|
- name: 'Rails edge'
|
|
26
|
-
ruby: '3.
|
|
26
|
+
ruby: '3.4'
|
|
27
27
|
gemfile: "Gemfile.rails-edge"
|
|
28
28
|
edge: true
|
|
29
29
|
|
|
@@ -70,9 +70,9 @@ jobs:
|
|
|
70
70
|
sudo apt-get update
|
|
71
71
|
sudo apt-get -y install libmemcached-dev libmysqlclient-dev libpq-dev libsasl2-dev
|
|
72
72
|
|
|
73
|
-
- uses: actions/checkout@
|
|
73
|
+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
74
74
|
- name: Set up Ruby
|
|
75
|
-
uses: ruby/setup-ruby@v1
|
|
75
|
+
uses: ruby/setup-ruby@4ff6f3611a42bc75eee1e5138240eb1613f48c8f # v1.266.0
|
|
76
76
|
with:
|
|
77
77
|
ruby-version: ${{ matrix.entry.ruby }}
|
|
78
78
|
bundler-cache: true
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
GIT
|
|
2
2
|
remote: https://github.com/Shopify/memcached.git
|
|
3
|
-
revision:
|
|
3
|
+
revision: 30f5735d5db2dfd50dd885ceeb51672320b356d3
|
|
4
4
|
branch: 1-0-stable-shopify
|
|
5
5
|
specs:
|
|
6
6
|
memcached (1.9.0)
|
|
@@ -8,21 +8,22 @@ GIT
|
|
|
8
8
|
PATH
|
|
9
9
|
remote: .
|
|
10
10
|
specs:
|
|
11
|
-
identity_cache (1.6.
|
|
11
|
+
identity_cache (1.6.4)
|
|
12
12
|
activerecord (>= 7.0)
|
|
13
13
|
ar_transaction_changes (~> 1.1)
|
|
14
14
|
|
|
15
15
|
GEM
|
|
16
16
|
remote: https://rubygems.org/
|
|
17
17
|
specs:
|
|
18
|
-
activemodel (
|
|
19
|
-
activesupport (=
|
|
20
|
-
activerecord (
|
|
21
|
-
activemodel (=
|
|
22
|
-
activesupport (=
|
|
18
|
+
activemodel (8.0.2)
|
|
19
|
+
activesupport (= 8.0.2)
|
|
20
|
+
activerecord (8.0.2)
|
|
21
|
+
activemodel (= 8.0.2)
|
|
22
|
+
activesupport (= 8.0.2)
|
|
23
23
|
timeout (>= 0.4.0)
|
|
24
|
-
activesupport (
|
|
24
|
+
activesupport (8.0.2)
|
|
25
25
|
base64
|
|
26
|
+
benchmark (>= 0.3)
|
|
26
27
|
bigdecimal
|
|
27
28
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
28
29
|
connection_pool (>= 2.2.5)
|
|
@@ -32,40 +33,42 @@ GEM
|
|
|
32
33
|
minitest (>= 5.1)
|
|
33
34
|
securerandom (>= 0.3)
|
|
34
35
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
36
|
+
uri (>= 0.13.1)
|
|
35
37
|
ar_transaction_changes (1.1.9)
|
|
36
38
|
activerecord (>= 5.2.0)
|
|
37
|
-
ast (2.4.
|
|
38
|
-
base64 (0.
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
ast (2.4.3)
|
|
40
|
+
base64 (0.3.0)
|
|
41
|
+
benchmark (0.4.1)
|
|
42
|
+
bigdecimal (3.2.2)
|
|
43
|
+
byebug (12.0.0)
|
|
41
44
|
cityhash (0.6.0)
|
|
42
|
-
concurrent-ruby (1.3.
|
|
43
|
-
connection_pool (2.
|
|
44
|
-
dalli (3.2.
|
|
45
|
-
drb (2.2.
|
|
46
|
-
i18n (1.14.
|
|
45
|
+
concurrent-ruby (1.3.5)
|
|
46
|
+
connection_pool (2.5.3)
|
|
47
|
+
dalli (3.2.8)
|
|
48
|
+
drb (2.2.3)
|
|
49
|
+
i18n (1.14.7)
|
|
47
50
|
concurrent-ruby (~> 1.0)
|
|
48
|
-
json (2.
|
|
49
|
-
language_server-protocol (3.17.0.
|
|
50
|
-
logger (1.
|
|
51
|
+
json (2.13.1)
|
|
52
|
+
language_server-protocol (3.17.0.5)
|
|
53
|
+
logger (1.7.0)
|
|
51
54
|
memcached_store (2.3.4)
|
|
52
55
|
activesupport (>= 6)
|
|
53
56
|
memcached (~> 1.8)
|
|
54
|
-
minitest (5.25.
|
|
55
|
-
mocha (2.1
|
|
57
|
+
minitest (5.25.5)
|
|
58
|
+
mocha (2.7.1)
|
|
56
59
|
ruby2_keywords (>= 0.0.5)
|
|
57
60
|
mysql2 (0.5.6)
|
|
58
|
-
parallel (1.
|
|
59
|
-
parser (3.3.0
|
|
61
|
+
parallel (1.27.0)
|
|
62
|
+
parser (3.3.9.0)
|
|
60
63
|
ast (~> 2.4.1)
|
|
61
64
|
racc
|
|
62
|
-
pg (1.5.
|
|
63
|
-
|
|
65
|
+
pg (1.5.9)
|
|
66
|
+
prism (1.4.0)
|
|
67
|
+
racc (1.8.1)
|
|
64
68
|
rainbow (3.1.1)
|
|
65
|
-
rake (13.
|
|
66
|
-
regexp_parser (2.
|
|
67
|
-
rexml (3.
|
|
68
|
-
strscan
|
|
69
|
+
rake (13.3.0)
|
|
70
|
+
regexp_parser (2.10.0)
|
|
71
|
+
rexml (3.4.2)
|
|
69
72
|
rubocop (1.61.0)
|
|
70
73
|
json (~> 2.3)
|
|
71
74
|
language_server-protocol (>= 3.17.0)
|
|
@@ -77,20 +80,21 @@ GEM
|
|
|
77
80
|
rubocop-ast (>= 1.30.0, < 2.0)
|
|
78
81
|
ruby-progressbar (~> 1.7)
|
|
79
82
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
80
|
-
rubocop-ast (1.
|
|
81
|
-
parser (>= 3.3.
|
|
83
|
+
rubocop-ast (1.46.0)
|
|
84
|
+
parser (>= 3.3.7.2)
|
|
85
|
+
prism (~> 1.4)
|
|
82
86
|
rubocop-shopify (2.9.0)
|
|
83
87
|
rubocop (~> 1.33)
|
|
84
88
|
ruby-progressbar (1.13.0)
|
|
85
89
|
ruby2_keywords (0.0.5)
|
|
86
|
-
securerandom (0.
|
|
90
|
+
securerandom (0.4.1)
|
|
87
91
|
spy (1.0.5)
|
|
88
|
-
stackprof (0.2.
|
|
89
|
-
|
|
90
|
-
timeout (0.4.1)
|
|
92
|
+
stackprof (0.2.27)
|
|
93
|
+
timeout (0.4.3)
|
|
91
94
|
tzinfo (2.0.6)
|
|
92
95
|
concurrent-ruby (~> 1.0)
|
|
93
|
-
unicode-display_width (2.
|
|
96
|
+
unicode-display_width (2.6.0)
|
|
97
|
+
uri (1.0.3)
|
|
94
98
|
|
|
95
99
|
PLATFORMS
|
|
96
100
|
arm64-darwin-22
|
data/identity_cache.gemspec
CHANGED
|
@@ -26,7 +26,6 @@ Gem::Specification.new do |gem|
|
|
|
26
26
|
gem.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
27
27
|
%x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^test/}) }
|
|
28
28
|
end
|
|
29
|
-
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
|
30
29
|
gem.name = "identity_cache"
|
|
31
30
|
gem.require_paths = ["lib"]
|
|
32
31
|
gem.version = IdentityCache::VERSION
|
|
@@ -165,11 +165,20 @@ module IdentityCache
|
|
|
165
165
|
# cache reads that happen from the ordering of callbacks. For example, if an after_commit
|
|
166
166
|
# callback enqueues a background job, then we don't want it to be possible for the
|
|
167
167
|
# background job to run and load data from the cache before it is invalidated.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
if ActiveRecord.version >= Gem::Version.new("7.1")
|
|
169
|
+
def run_callbacks(kind, type = nil)
|
|
170
|
+
if kind == :commit && (destroyed? || transaction_changed_attributes.present?)
|
|
171
|
+
expire_cache
|
|
172
|
+
end
|
|
173
|
+
super
|
|
174
|
+
end
|
|
175
|
+
else
|
|
176
|
+
def run_callbacks(kind)
|
|
177
|
+
if kind == :commit && (destroyed? || transaction_changed_attributes.present?)
|
|
178
|
+
expire_cache
|
|
179
|
+
end
|
|
180
|
+
super
|
|
171
181
|
end
|
|
172
|
-
super
|
|
173
182
|
end
|
|
174
183
|
|
|
175
184
|
# Invalidate the cache data associated with the record. Returns `true` on success,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: identity_cache
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Camilo Lopez
|
|
@@ -11,10 +11,9 @@ authors:
|
|
|
11
11
|
- Tobias Lutke
|
|
12
12
|
- Arthur Neves
|
|
13
13
|
- Francis Bogsanyi
|
|
14
|
-
autorequire:
|
|
15
14
|
bindir: bin
|
|
16
15
|
cert_chain: []
|
|
17
|
-
date:
|
|
16
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
18
17
|
dependencies:
|
|
19
18
|
- !ruby/object:Gem::Dependency
|
|
20
19
|
name: activerecord
|
|
@@ -107,6 +106,7 @@ executables: []
|
|
|
107
106
|
extensions: []
|
|
108
107
|
extra_rdoc_files: []
|
|
109
108
|
files:
|
|
109
|
+
- ".github/dependabot.yml"
|
|
110
110
|
- ".github/workflows/ci.yml"
|
|
111
111
|
- ".github/workflows/cla.yml"
|
|
112
112
|
- ".gitignore"
|
|
@@ -176,7 +176,6 @@ homepage: https://github.com/Shopify/identity_cache
|
|
|
176
176
|
licenses: []
|
|
177
177
|
metadata:
|
|
178
178
|
allowed_push_host: https://rubygems.org
|
|
179
|
-
post_install_message:
|
|
180
179
|
rdoc_options: []
|
|
181
180
|
require_paths:
|
|
182
181
|
- lib
|
|
@@ -191,8 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
191
190
|
- !ruby/object:Gem::Version
|
|
192
191
|
version: '0'
|
|
193
192
|
requirements: []
|
|
194
|
-
rubygems_version: 3.
|
|
195
|
-
signing_key:
|
|
193
|
+
rubygems_version: 3.7.2
|
|
196
194
|
specification_version: 4
|
|
197
195
|
summary: IdentityCache lets you specify how you want to cache your model objects,
|
|
198
196
|
at the model level, and adds a number of convenience methods for accessing those
|