artsy/garner — pull request #59 by fancyremarker (2013-09-20 19:31:24+00:00)
Title: [Do Not Merge] Example of BindingIndex invalidation strategy's failure to handle reused (non-unique) identities.

Don't merge this, as it's just a failing spec to demonstrate the failure of the `BindingIndex` invalidation strategy to handle `Mongoid::Identity` bindings in cases where the document class uses non-unique slugs (i.e., `slug` without `{ :history => true }`), and a slug gets reused on two different objects.

This is representative of a more general issue, where the `BindingIndex` invalidation strategy (by design) never updates the canonical binding reference for non-canonical bindings. So, if an invalid value is ever written to the canonical binding reference, the cache will never heal (except by calling `invalidate_garner_caches` directly on the **non-canonical binding**).

My opinion is that the current behavior should not be modified, but I wanted to at least document the issue.

cc: @dblock @dylanfareed