Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable IdentityMap #288

Merged
merged 4 commits into from
Jul 16, 2012
Merged

Configurable IdentityMap #288

merged 4 commits into from
Jul 16, 2012

Conversation

stve
Copy link
Collaborator

@stve 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 3 commits July 16, 2012 00:22
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
end
end

# Alias for backwards compatability
class << self
alias fetch_or_new fetch_or_create
alias fetch_or_create fetch_or_new
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants