Method: ActiveSupport::Cache::Entry#bytesize
- Defined in:
- lib/active_support/cache/entry.rb
#bytesize ⇒ Object
Returns the size of the cached value. This could be less than value.bytesize if the data is compressed.
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/active_support/cache/entry.rb', line 61 def bytesize case value when NilClass 0 when String @value.bytesize else @s ||= Marshal.dump(@value).bytesize end end |