Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
So I'm creating a new member programmatically using MembershipHelper.CreateRegistrationModel(). This works fine and I can create the new member. I then use MemberService.GetByUsername() to retrieve my newly created member, populate the relevant extra properties and use MemberService.Save(member) to save the updated member.
This all works fine, but immediately after creation I try to retrieve the new member using MembershipHelper.GetById(). This returns an IPublishedContent object however I'm guessing at this point the cache hasn't been updated, as all the model properties are empty.
However this got me thinking: When is the cache updated? Because when I make a web api call immediately after the above statements are finished, the IPublishedContent object is populated.. so somewhere in between the cache got updated and I can't figure out where..
Can anybody help here?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted