Skip to content

Commit

Permalink
Merge pull request #469 from glebglazov/fixing-cas
Browse files Browse the repository at this point in the history
Fixing CAS for Dalli adapter
  • Loading branch information
dylanahsmith authored Jan 8, 2021
2 parents 1838e72 + c83e461 commit 423aa50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/identity_cache/mem_cache_store_cas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def cas_multi(*names, **options)
cas_id = raw_values[key].last
entry = ActiveSupport::Cache::Entry.new(value, **options)
payload = options[:raw] ? entry.value.to_s : entry
@data.replace_cas(key, payload, options[:expires_in].to_i, cas_id, options)
@data.replace_cas(key, payload, cas_id, options[:expires_in].to_i, options)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/cache_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def backend
@backend ||= case ENV['ADAPTER']
when nil, 'dalli'
require 'active_support/cache/mem_cache_store'
ActiveSupport::Cache::MemCacheStore.new("#{host}:11211", failover: false)
ActiveSupport::Cache::MemCacheStore.new("#{host}:11211", failover: false, expires_in: 6.hours.to_i)
when 'memcached'
require 'memcached_store'
require 'active_support/cache/memcached_store'
Expand Down

0 comments on commit 423aa50

Please sign in to comment.