I opened a pull request on my changes: 
https://github.com/rails/rails/pull/7800.

I updated the code a bit and fixed the tests so it is slightly different 
than the branch referenced above. It should now be backward compatible with 
older cache entries as well.

As for the Array idea, that would certainly reduce overhead a little bit, 
but I'm not sure it's worth it in terms of maintainability. For what it's 
worth, 27 of the 58 byte serialization overhead comes just from the class 
name "ActiveSupport::Cache::Entry".
 

On Thursday, September 27, 2012 2:01:14 AM UTC-7, Xavier Noria wrote:
>
> I was thinking also about the possibility of using an array instead of 
> Entry. Arrays dump to even much less bytes, though they have the cons that 
> are harder to evolve if we add any other metadata to the entry.
>
> In my experience small values like counters and flags are common, so I 
> think squeezing this as much as possible is worth pursuing.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/8GtncgaqNacJ.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to