Returns the size of the
cached value. This
could be less than value.bytesize if the
data is compressed.
# File activesupport/lib/active_support/cache.rb, line 817
def bytesize
case value
when NilClass
0
when String
@value.bytesize
else
@s ||= Marshal.dump(@value).bytesize
end
end