Reusing the configuration classes instance - performance perceptive
-
I have a pretty big website where website configurations are written in separate XML files(not in web.config). I have a class which reads this configurations. This configurations will be same for all the visitors. So I am looking for a method to cache this classes instance for improved performance. But since I am using this class inside my business layers, I don't have access to the Page object. Is there anyway to cache it and get it back without using Page object ? Any help would be appreciated
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
I have a pretty big website where website configurations are written in separate XML files(not in web.config). I have a class which reads this configurations. This configurations will be same for all the visitors. So I am looking for a method to cache this classes instance for improved performance. But since I am using this class inside my business layers, I don't have access to the Page object. Is there anyway to cache it and get it back without using Page object ? Any help would be appreciated
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
As far as i remember you can access the cache using the httpconext httpcontext.current.cache.add, etc Hope that helps
Thanks, But I guess, I don't have handle to HttpContext class inside my class.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
Thanks, But I guess, I don't have handle to HttpContext class inside my class.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions