Clear Umbraco cache to read updated Member profile values
Hi.
I am using osMember controls to create a member profile section. Otherwise, at the top of this section template, i have an XSLT block where a logged member can read a few lines about his profile like a welcome message with his member_firstname field and another field that shows member_location.
Everything works perfectly except for one thing. Whenever a member updates his profile information, the top section information rendered via XSLT is not updated.
I mean, if i change my profile location from "city_A" to "city_B", and even if it is correctly stored, at the top users area i still reads the welcome message with old location "city_A".
I tried adding the following lines to my "MemberProfile.ascx.cs" code to get Umbraco Cache cleared without success:
By the way. Coul you recommend me a cheap hosting service for umbraco? I am currently workin with Arvixe but having a lot of problems lately, specially with databases. I was previously working with DotNetHost without problems but is no longer offering hosting services.
Clear Umbraco cache to read updated Member profile values
Hi.
I am using osMember controls to create a member profile section. Otherwise, at the top of this section template, i have an XSLT block where a logged member can read a few lines about his profile like a welcome message with his member_firstname field and another field that shows member_location.
Everything works perfectly except for one thing. Whenever a member updates his profile information, the top section information rendered via XSLT is not updated.
I mean, if i change my profile location from "city_A" to "city_B", and even if it is correctly stored, at the top users area i still reads the welcome message with old location "city_A".
I tried adding the following lines to my "MemberProfile.ascx.cs" code to get Umbraco Cache cleared without success:
umbraco.library.UpdateDocumentCache(n.Id);
HttpRuntime.UnloadAppDomain();
Member.RemoveMemberFromCache(m.Id);
Member.ClearMemberFromClient(m.Id);
Member.AddMemberToCache(m);
What is strange is that If i save member profile information three times in a row, then i get top XSLT block information updated.
Any ideas?
Have you tried the following? Obviously this is creating a user but does invalidate the cache
Thanks for your reply Simon.
Finally I solved it using an XSLT workaround.
Cool no worries - care to add the workaround so we can all benefit?
Sure. I created a "SessionLibrary.xslt" file to store current location similiar to the one i use for multilanguage 1:1 solutions.
Then i include this file wherever i need to get selected location.
By the way. Coul you recommend me a cheap hosting service for umbraco? I am currently workin with Arvixe but having a lot of problems lately, specially with databases. I was previously working with DotNetHost without problems but is no longer offering hosting services.
is working on a reply...