Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Reusing the configuration classes instance - performance perceptive

Reusing the configuration classes instance - performance perceptive

Scheduled Pinned Locked Moved ASP.NET
csharphtmlcombusinessxml
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    N a v a n e e t h
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • N N a v a n e e t h

      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

      S Offline
      S Offline
      SHatchard
      wrote on last edited by
      #2

      As far as i remember you can access the cache using the httpconext httpcontext.current.cache.add, etc Hope that helps

      N 1 Reply Last reply
      0
      • S SHatchard

        As far as i remember you can access the cache using the httpconext httpcontext.current.cache.add, etc Hope that helps

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        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

        S 1 Reply Last reply
        0
        • N N a v a n e e t h

          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

          S Offline
          S Offline
          SHatchard
          wrote on last edited by
          #4

          You will have, as long as the class is called from a web site you will be able to access httpcontext.current.cache, .request, .response and all that stuff... Give it a try

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups