1

I am working with a DNN 6.01 installation, where we create new subdomains + portal aliases for new users. If relevant, we are working with C#.

This mostly works great, however at present if we rename one of the subdomain/alias pairs (say, due to a typo on creation or something) the change doesn't take effect until we recycle the app pool. As this is a live application with thousands of users and eCommerce solutions, resetting everyone's session randomly is not acceptable. Waiting until a nightly recycle for subdomain/alias changes to take effect is less than ideal.

It would also be preferable to do this programatically so that I can simply incorporate it into the module that manages the subdomain/alias pairs.

How can I programatically refresh the DNN Portal Alias Cache without recycling the app pool and/or dropping sessions?

Mir
  • 2,429
  • 1
  • 29
  • 34

2 Answers2

2

If you are using the public APIs (PortalAliasController.UpdatePortalAliasInfo seems appropriate) then the cache should be taken care of. If the public APIs are not working, please create a bug in the tracker at support.dotnetnuke.com.

If you really can't use the public API (you really really should use the public API) then you probably want to call DataCache.RemoveCache(DataCache.PortalAliasCacheKey).

As of 6.2 the API also takes care of internally managing routes for the Services Framework. I don't think there are any public methods to take care of the internals of Services Framework, so that is another reason to be sure to use the public APIs.

ScottS
  • 8,455
  • 3
  • 30
  • 50
0

I hate to say it but it sounds like you'd just have to schedule downtime and recycle. You can do a Clear Cache from the Host panel but I'm not sure if that would accomplish what you're looking for.

dgarbacz
  • 962
  • 1
  • 7
  • 17
  • I've run with this idea, and figured out how to clear the host cache programatically (DataCache.ClearHostCache) but I'm still testing to see if this clears the portal alias cache... the documentation is sparse. – Mir Oct 12 '12 at 16:25