When does the umbraco cache rebuild after member creation?
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..
When does the umbraco cache rebuild after member creation?
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.