Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Cache & User RolesCache & User Roles
Previous
 
Next
New Post
5/28/2007 10:54 PM
 

I know this has been talked about before, but I am unable to find a solution for the caching problem I am having.

I created a new Manage Services module where I've incorporated my own PayPal processing code to clear credit cards without the user "leaving" the site.  Once the card has been authed, I force the user to a new role.  Even though I have the Caching property set to Zero on the new module page, the user does not see the added role for a least one minute.  Since I force the user back to the Managed Serivces page that shows a list of all subscribed and unsubscribed services (subscriptions), there will be some confussion since the list will still show the user is not subscribed to the new service.

Does anyone have any ideas on how I can fix this?  Again, after about a minute or two, the user sees the new role, but I need it to be immidiate.

Thanks,

-Scott

 
New Post
5/29/2007 6:25 AM
 

I believe this request was being worked on for 4.5.2 - there should be an additional overload that forces a refresh of the users roles. I'm not at my development pc at present so can't find the code, if I get a chance later I'll update this post accordingly.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
5/29/2007 8:21 AM
 

4.5.2 is just out (release notes @ http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/-1/threadid/138685/scope/posts/Default.aspx)- I believe the fix for the issue is described via:

"fixed bug in User Profile where updating profile information would not take effect immediatey. This is because the ClearUserCache method was referencing the wrong cachekey"

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
5/29/2007 12:37 PM
 

Cathal,

Thanks for the reply.  Unfortunately the new version (4.5.2) has the same problem.  After updating a user profile with a new role, it takes 1 to 2 minutes for the role to become visible/usable.

Has anyone found a way around this?  I have to assume there is a work-around.  I just dont' think asking the user to wait a few minutes or having them logout, then back in again is a viable solution.

Short of creating a routine to check the DB on my own, I'm not sure how to fix this problem.  Ideas??

Thanks,

-Scott

 
New Post
5/29/2007 5:38 PM
 

hhm, perhaps I was wrong but i was sure someone was looking at this. Maybe it didn't make the deadline for 4.5.2. AFAIR the issue is the users roles are cached in the Response.Cookies("portalroles") cookie for 1 minute. When each new page request occurs, if the cookie has expired the values are read back from the database, otherwise the cookie values are used. If you manually expire the cookie immediately after you write the new role, and before you redirect to another page it should force a refresh i.e.

Response.Cookies("portalroles").Value = Nothing
Response.Cookies("portalroles").Path = "/"
Response.Cookies("portalroles").Expires = DateTime.Now.AddYears(-30)

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Cache & User RolesCache & User Roles


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out