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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Clear module cache from Host Settings.Clear module cache from Host Settings.
Previous
 
Next
New Post
8/21/2006 9:55 AM
 
hi,
 
We needed to build a module which stores its content in the Cache. Its basically a tree view.  I have implemented the following code to store the data in the cache o f DotNetNuke. It works all fine.
 
To add object into cache:
DotNetNuke.Services.Cache.CachingProvider.Instance().Add(strCacheKey, objValue, null, DateTime.Now.AddMinutes(double.Parse(this.Settings["CacheInterval"].ToString())), TimeSpan.Zero, CacheItemPriority.High, onRemove);
 
We also have provided a link in the Action menu to clear the Cache. The following code has been written for it which also works fine.
 
To remove from cache:
DotNetNuke.Services.Cache.CachingProvider.Instance().Remove(key);
 
Now there's a requirement from the client that the Cache should get cleared when the cache is cleared from Host -> Host Settings.  This is not happening and we are not able to figure out how we can acheive it.
 
Any help on this would be highly appreciated.
 
thanks 
     Vishwanath
 
New Post
8/21/2006 6:04 PM
 
 encounter same problem and also SynchronizeModule() is not working. Also actionMenuEVent.ClearCache not.

string _modelNameCacheString = Functions.BuildCacheKey(this.IsEditable, this.PortalId, ModuleConstants.DropDownModelNameCache);

List<ModelSGInfo> _modelList = (List<ModelSGInfo>)DataCache.GetCache(_modelNameCacheString);

if (_modelList == null)

{

if (Settings[ModuleConstants.MainPortalId] != null)

_modelList = _TennisRacquetsController.SelectTennisRacquetModelNames(System.Convert.ToInt32(Settings[ModuleConstants.MainPortalId]), this.PortalId, int.Parse(this.DropDownBrand.SelectedValue), false);

if (_modelList.Count > 0)

DataCache.SetCache(_modelNameCacheString, _modelList);//, new TimeSpan(2,0,0), false);

}

==

public ModuleActionCollection ModuleActions

{

get

{

ModuleActionCollection Actions = new ModuleActionCollection();

//if(ModuleConfiguration.CacheTime != 0)

Actions.Add(GetNextActionID(),

Localization.GetString(ModuleActionType.ClearCache, Localization.GlobalResourceFile),

ModuleActionType.ClearCache,

ModuleConfiguration.ModuleID.ToString(),

"restore.gif", "", false, SecurityAccessLevel.Admin,

true, false);

//ModuleActionType.ClearCache, "", "", true, SecurityAccessLevel.Edit, true, false);

return Actions;

}

}

 
New Post
8/23/2006 2:00 AM
 

hi,

Can anybody help me on this? Its a bit urgent.

Thanks,
    Vishwanath

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Clear module cache from Host Settings.Clear module cache from Host Settings.


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