On Fri, Sep 21, 2012 at 8:48 PM, Brian Durand
<[email protected]>wrote:

Hi Brian,

The Entry model does provide one other feature which I think also warrants
> keeping it around and which is even potentially more valuable than the
> race_condition_ttl. It allows the cache to store nil values.


You are right. That in itself justifies Entry I believe. We could add a
comment in the source code of the memcached store that documents these two
pros for the next guy wondering about why we use Entry :).


That being said, there is certainly room for improving the efficiency of
> the Entry model and since it is something called frequently and in
> performance critical section of code, I think it is certainly warranted.
>
> I've code up an optimized version of it here:
> https://github.com/bdurand/rails/commit/e78c30100f54ae4366fdb9352987bae9b8c1c1e7
> .
>

Awesome! Would you be so kind as to prepare a pull request with these
enhancements? It would need a CHANGELOG entry that documents the serialized
object changes. Also worth mentioning in the upgrading guide I believe.

Do you think we could hack something in order to support already cached
values on deserialization to ease upgrading? Otherwise all caches would
need to be wiped.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to