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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Module Caching does not seem to be working since 4.9.0 UpgradeModule Caching does not seem to be working since 4.9.0 Upgrade
Previous
 
Next
New Post
10/6/2008 12:18 AM
 

Hi,

I use caching heavily in my Smart-Thinker modules, for example UserProfiles are cached.  I upgraded PokerDIY to DNN 4.9.0 yesterday and have noticed that the caching does not seem to be expiring. Running the PurgeCache Task manually does not clear it (are they not related?) and the only thing that does is to restart the application. For example, this user edited their profile and the changes are not reflected until the application is restarted.

This was working fine pre-4.9 and I could not find anything in the release notes that indicated a change in this behaviour. There are no dodgy Event Viewer messages.

 

Here is my code - can anyone shed any light on why this stopped working?


        public UserInfo GetUserFromCacheOrDB(int portalID, int userID, int profileCacheSeconds)
        {
            //check if caching must be used - check if this user record is in the cache, and use it
            string cacheKey = portalID.ToString() + "UserID" + userID.ToString();
            UserInfo user = null;

            if (profileCacheSeconds > 0)
            {
                user = (UserInfo)DataCache.GetCache(cacheKey);
            }

            if (user == null)
            {
                //not in cache or caching is not used, get from the DB
                user = new UserController().GetUser(portalID, userID);
                if (user != null && profileCacheSeconds > 0)
                {
                    //add it to the cache with an absolute expiry time
                    DataCache.SetCache(cacheKey, user, DateTime.Now.AddSeconds(profileCacheSeconds));
                }
            }
            return user;
        }

 


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/7/2008 9:57 PM
 

*bump*  (this is critical...)


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/10/2008 5:54 PM
 

Has anyone on DNN 4.9 noticed anything odd like this?


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/11/2008 4:52 AM
 

Rodney,

I remember, that there have been changes regarding caching in DNN 4.9.0. I myself have not yet encountered issues after upgrading to DNN 4.9.0. Does this happen on heavily used sites only? Are you using DotNetNuke cache or .Net cache methods?


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/11/2008 6:38 AM
 

Hi Sebastian,

Thanks for the reply - I use the DNN caching methods - I think it could be something to do with the timestamp as it does cache but only expires a few hours later instead of the 2 minutes that I specified.

The UsersOnline issue could be related - ever since the upgrade the users online table is populating and clearing but it's almost like it is out of synch - can't quite work it out!


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Module Caching does not seem to be working since 4.9.0 UpgradeModule Caching does not seem to be working since 4.9.0 Upgrade


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