method
write_serialized_entry
v7.0.0 -
Show latest stable
-
0 notes -
Class: ActiveSupport::Cache::MemCacheStore
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
write_serialized_entry(key, payload, **options)
private
Hide source
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 233 def write_serialized_entry(key, payload, **options) method = options[:unless_exist] ? :add : :set expires_in = options[:expires_in].to_i if options[:race_condition_ttl] && expires_in > 0 && !options[:raw] # Set the memcache expire a few minutes in the future to support race condition ttls on read expires_in += 5.minutes end rescue_error_with false do # Don't pass compress option to Dalli since we are already dealing with compression. options.delete(:compress) @data.with { |c| c.send(method, key, payload, expires_in, **options) } end end