Configurable IdentityMap #288

merged 4 commits into from Jul 16, 2012


None yet

2 participants

stve commented Jul 16, 2012

Changes based on our discussions in #285 and #286 the identity map is now a global on the Twitter module and can be disabled or replaced. I've also switched back to fetch_or_new, I left an alias to fetch_or_create in Twitter::Base though it may not be necessary if the changes from my previous PR have not been released.

stve added some commits Jul 16, 2012
@stve stve added global identity map d0d1a27
@stve stve switch back to fetch_or_new 8495ad6
@stve stve Updated Twitter::Base and Twitter::Identity to use global identity map.
The identity map is now exposed as a global and can be disabled:

    Twitter.identity_map = false

Likewise, it can be replaced by a custom implementation:

    Twitter.identity_map = My::Custom::SqliteIdentityMap
@sferik sferik commented on an outdated diff Jul 16, 2012
# Alias for backwards compatability
class << self
- alias fetch_or_new fetch_or_create
+ alias fetch_or_create fetch_or_new
sferik Jul 16, 2012 Owner

This alias can be removed.

@sferik sferik merged commit c00ab51 into master Jul 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment