Method: AnyCache::Adapters::Redis#write
- Defined in:
- lib/any_cache/adapters/redis.rb
#write(key, value, **options) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
97 98 99 100 101 102 103 |
# File 'lib/any_cache/adapters/redis.rb', line 97 def write(key, value, **) raw = .fetch(:raw, false) expires_in = .fetch(:expires_in, NO_EXPIRATION_TTL) value = transform_value(value) unless raw expires_in ? setex(key, expires_in, value) : set(key, value) end |