Skip to content

Added RavenUserAuthRepository Indexes#20

Merged
mythz merged 1 commit intoServiceStackV3:masterfrom
khalidabuhakmeh:master
Jan 29, 2013
Merged

Added RavenUserAuthRepository Indexes#20
mythz merged 1 commit intoServiceStackV3:masterfrom
khalidabuhakmeh:master

Conversation

@khalidabuhakmeh
Copy link
Copy Markdown
Contributor

The original implementation was great, but was depending on temporary indexes to query for users and emails. The issue with this is temporary indexes is that they are cleared after a period of inactivity and you will get no results back as it builds that index for the first time.

The changes here insure that you are hitting indexes that are permanent and that will be as current as any other RavenDB index.

ServiceStack/UserAuth/ByUsernameOrEmail
ServiceStack/UserAuth/ByOAuthProvider

You can either call the static method I provided and it will execute the indexes on your DocumentStore, or the first time a RavenUserAuthRepository is created the indexes will be PUT into the database. RavenDB is smart about index changes so even if it is called a few times it is not a huge performance hit (no need to do any locking).

I've tested this in another project and it seems to be working nicely, but please test this out yourself.

mythz added a commit that referenced this pull request Jan 29, 2013
Added RavenUserAuthRepository Indexes
@mythz mythz merged commit 8b3fdb1 into ServiceStackV3:master Jan 29, 2013
@mythz
Copy link
Copy Markdown
Contributor

mythz commented Jan 29, 2013

Cool, thx.

@khalidabuhakmeh
Copy link
Copy Markdown
Contributor Author

Holy cow you are quick. No problem. I am loving ServiceStack so far.

@mythz
Copy link
Copy Markdown
Contributor

mythz commented Jan 29, 2013

Yep that's how we do things under github.com/ServiceStack :)
Not too many people are using this since it's not up on NuGet yet, I hope to put it up soon. It needs some tests around this as well.

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