File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
activesupport/lib/active_support/cache Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -131,14 +131,19 @@ def initialize(*addresses)
131
131
MSG
132
132
@data = addresses . first
133
133
else
134
- mem_cache_options = options . dup
134
+ @ mem_cache_options = options . dup
135
135
# The value "compress: false" prevents duplicate compression within Dalli.
136
- mem_cache_options [ :compress ] = false
137
- ( OVERRIDDEN_OPTIONS - %i( compress ) ) . each { |name | mem_cache_options . delete ( name ) }
138
- @data = self . class . build_mem_cache ( *( addresses + [ mem_cache_options ] ) )
136
+ @ mem_cache_options[ :compress ] = false
137
+ ( OVERRIDDEN_OPTIONS - %i( compress ) ) . each { |name | @ mem_cache_options. delete ( name ) }
138
+ @data = self . class . build_mem_cache ( *( addresses + [ @ mem_cache_options] ) )
139
139
end
140
140
end
141
141
142
+ def inspect
143
+ instance = @data || @mem_cache_options
144
+ "#<#{ self . class } options=#{ options . inspect } mem_cache=#{ instance . inspect } >"
145
+ end
146
+
142
147
##
143
148
# :method: write
144
149
# :call-seq: write(name, value, options = nil)
You can’t perform that action at this time.
0 commit comments