Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dalli from 2.7.10 to 2.7.11 #4636

Merged
merged 2 commits into from
Aug 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gem "caxlsx_rails", "~> 0.6.2"
gem "ckeditor", "~> 4.3.0"
gem "cocoon", "~> 1.2.15"
gem "daemons", "~> 1.4.0"
gem "dalli", "~> 2.7.10"
gem "dalli", "~> 2.7.11"
gem "delayed_job_active_record", "~> 4.1.6"
gem "devise", "~> 4.8.0"
gem "devise-async", "~> 1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ GEM
tins (~> 1.6)
crass (1.0.6)
daemons (1.4.0)
dalli (2.7.10)
dalli (2.7.11)
database_cleaner (2.0.1)
database_cleaner-active_record (~> 2.0.0)
database_cleaner-active_record (2.0.1)
Expand Down Expand Up @@ -713,7 +713,7 @@ DEPENDENCIES
cocoon (~> 1.2.15)
coveralls (~> 0.8.23)
daemons (~> 1.4.0)
dalli (~> 2.7.10)
dalli (~> 2.7.11)
database_cleaner (~> 2.0.1)
delayed_job_active_record (~> 4.1.6)
devise (~> 4.8.0)
Expand Down
4 changes: 0 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class Application < Rails::Application
# Use local forms with `form_with`, so it works like `form_for`
config.action_view.form_with_generates_remote_forms = false

# Keep disabling cache versioning until we verify it's compatible
# with `:dalli_store` and with the way we cache stats
config.active_record.cache_versioning = false

# Keep using AES-256-CBC for message encryption in case it's used
# in any CONSUL installations
config.active_support.use_authenticated_message_encryption = false
Expand Down
2 changes: 1 addition & 1 deletion config/environments/preproduction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)

# Use a different cache store in production.
config.cache_store = :dalli_store, { value_max_bytes: 2000000 }
config.cache_store = :mem_cache_store

# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
config.log_tags = [:request_id]

# Use a different cache store in production.
config.cache_store = :dalli_store, { value_max_bytes: 2000000 }
config.cache_store = :mem_cache_store

# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
Expand Down
2 changes: 1 addition & 1 deletion config/environments/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)

# Use a different cache store in production.
config.cache_store = :dalli_store
config.cache_store = :mem_cache_store

# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
debate = create(:debate, tag_list: "Good, Bad")
tag = Tag.find_by(name: "Bad")

expect { tag.destroy }.to change { debate.reload.cache_key }
expect { tag.destroy }.to change { debate.reload.cache_version }
end
end
end
12 changes: 6 additions & 6 deletions spec/models/comment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,33 +86,33 @@

it "expires cache when it has a new vote" do
expect { create(:vote, votable: comment) }
.to change { comment.updated_at }
.to change { comment.cache_version }
end

it "expires cache when hidden" do
expect { comment.hide }
.to change { comment.updated_at }
.to change { comment.cache_version }
end

it "expires cache when the author is hidden" do
expect { comment.user.hide }
.to change { [comment.reload.updated_at, comment.author.updated_at] }
.to change { [comment.reload.cache_version, comment.author.cache_version] }
end

it "expires cache when the author is erased" do
expect { comment.user.erase }
.to change { [comment.reload.updated_at, comment.author.updated_at] }
.to change { [comment.reload.cache_version, comment.author.cache_version] }
end

it "expires cache when the author changes" do
expect { comment.user.update(username: "Isabel") }
.to change { [comment.reload.updated_at, comment.author.updated_at] }
.to change { [comment.reload.cache_version, comment.author.cache_version] }
end

it "expires cache when the author's organization get verified" do
create(:organization, user: comment.user)
expect { comment.user.organization.verify }
.to change { [comment.reload.updated_at, comment.author.updated_at] }
.to change { [comment.reload.cache_version, comment.author.cache_version] }
end
end

Expand Down
18 changes: 9 additions & 9 deletions spec/models/debate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -351,48 +351,48 @@

it "expires cache when it has a new comment" do
expect { create(:comment, commentable: debate) }
.to change { debate.updated_at }
.to change { debate.cache_version }
end

it "expires cache when it has a new vote" do
expect { create(:vote, votable: debate) }
.to change { debate.updated_at }
.to change { debate.cache_version }
end

it "expires cache when it has a new flag" do
expect { create(:flag, flaggable: debate) }
.to change { debate.reload.updated_at }
.to change { debate.reload.cache_version }
end

it "expires cache when it has a new tag" do
expect { debate.update(tag_list: "new tag") }
.to change { debate.updated_at }
.to change { debate.cache_version }
end

it "expires cache when hidden" do
expect { debate.hide }
.to change { debate.updated_at }
.to change { debate.cache_version }
end

it "expires cache when the author is hidden" do
expect { debate.author.hide }
.to change { [debate.reload.updated_at, debate.author.updated_at] }
.to change { [debate.reload.cache_version, debate.author.cache_version] }
end

it "expires cache when the author is erased" do
expect { debate.author.erase }
.to change { [debate.reload.updated_at, debate.author.updated_at] }
.to change { [debate.reload.cache_version, debate.author.cache_version] }
end

it "expires cache when its author changes" do
expect { debate.author.update(username: "Eva") }
.to change { [debate.reload.updated_at, debate.author.updated_at] }
.to change { [debate.reload.cache_version, debate.author.cache_version] }
end

it "expires cache when the author's organization get verified" do
create(:organization, user: debate.author)
expect { debate.author.organization.verify }
.to change { [debate.reload.updated_at, debate.author.updated_at] }
.to change { [debate.reload.cache_version, debate.author.cache_version] }
end
end

Expand Down
18 changes: 9 additions & 9 deletions spec/models/proposal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -386,48 +386,48 @@

it "expires cache when it has a new comment" do
expect { create(:comment, commentable: proposal) }
.to change { proposal.updated_at }
.to change { proposal.cache_version }
end

it "expires cache when it has a new vote" do
expect { create(:vote, votable: proposal) }
.to change { proposal.updated_at }
.to change { proposal.cache_version }
end

it "expires cache when it has a new flag" do
expect { create(:flag, flaggable: proposal) }
.to change { proposal.reload.updated_at }
.to change { proposal.reload.cache_version }
end

it "expires cache when it has a new tag" do
expect { proposal.update(tag_list: "new tag") }
.to change { proposal.updated_at }
.to change { proposal.cache_version }
end

it "expires cache when hidden" do
expect { proposal.hide }
.to change { proposal.updated_at }
.to change { proposal.cache_version }
end

it "expires cache when the author is hidden" do
expect { proposal.author.hide }
.to change { [proposal.reload.updated_at, proposal.author.updated_at] }
.to change { [proposal.reload.cache_version, proposal.author.cache_version] }
end

it "expires cache when the author is erased" do
expect { proposal.author.erase }
.to change { [proposal.reload.updated_at, proposal.author.updated_at] }
.to change { [proposal.reload.cache_version, proposal.author.cache_version] }
end

it "expires cache when its author changes" do
expect { proposal.author.update(username: "Eva") }
.to change { [proposal.reload.updated_at, proposal.author.updated_at] }
.to change { [proposal.reload.cache_version, proposal.author.cache_version] }
end

it "expires cache when the author's organization get verified" do
create(:organization, user: proposal.author)
expect { proposal.author.organization.verify }
.to change { [proposal.reload.updated_at, proposal.author.updated_at] }
.to change { [proposal.reload.cache_version, proposal.author.cache_version] }
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -484,18 +484,18 @@

it "expires cache with becoming a moderator" do
expect { create(:moderator, user: user) }
.to change { user.updated_at }
.to change { user.cache_version }
end

it "expires cache with becoming an admin" do
expect { create(:administrator, user: user) }
.to change { user.updated_at }
.to change { user.cache_version }
end

it "expires cache with becoming a veridied organization" do
create(:organization, user: user)
expect { user.organization.verify }
.to change { user.reload.updated_at }
.to change { user.reload.cache_version }
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/shared/models/map_validations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
mappable.save!

expect { map_location.update(latitude: 12.34) }
.to change { mappable.reload.updated_at }
.to change { mappable.reload.cache_version }
end
end
end