Forum


HomeHomePremiumPremiumDevelopmentDevelopmentCache Reflection resultsCache Reflection results
Previous
 
Next
New Post
9/2/2013 3:12 PM
 

Hi,

How can I cache reflection in DNN 7.1, I am saving class name using UpdateSettings in tabModule table, so I can reuse one module as a generic and each time I add that module to a new page. I am using reflection to get the class name and execute relevent code. Now I want to cache this info once added for that page so it will not use reflection each time page is loaded. Please provide any example on how I can cache specific info and what will be the scope of caching.

 

 
New Post
9/3/2013 4:31 AM
 

Imran,

 Interesting question.  One observation is that you could use the factory technique I am using in the Data Access tutorial to get an object from a string setting.  That may perform better than reflection.  Regardless, if you watch the rest of my Data Access series and download the code, it gives you specific examples on how to cache an object or list of objects in DNN.  Typically for module data, you would use the module id as part of the cache scope key.  But you can make it the tabid which would cache by page if you need to.  Check out the first two videos of this series and let me know if you have any more questions: http://www.dnnhero.com/Premium/Tutorial/tabid/259/ArticleID/219/DNN-Data-Access-Techniques-DAL-Part-1-5.aspx

 
New Post
9/3/2013 5:21 PM
 

Thank you Scott,

I will go through videos hopefully tomorrow.

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentCache Reflection resultsCache Reflection results



Try FREE
30 days money back guaranteed