Application or Cache

Discussion in 'ASP .Net' started by stefano mostarda, Nov 17, 2003.

  1. Hi there,

    I have a question.

    In my application I have a table which is frequently used to fill a combo. I
    want to store it in the application or cache object. it is never updated.

    What's the besta container to improve performance and scalability, Cache or
    Application object?

    Thanks in advance
    Stefano Mostarda
    Rom Italy
     
    stefano mostarda, Nov 17, 2003
    #1
    1. Advertising

  2. stefano mostarda

    Janaka Guest

    Stefano,

    You can store this in either really. If you use the Cache though you can
    set a sliding scale expiration, for say an hour, so that its not using up
    resources when not in use.

    Janaka

    "stefano mostarda" <> wrote in message
    news:%...
    > Hi there,
    >
    > I have a question.
    >
    > In my application I have a table which is frequently used to fill a combo.

    I
    > want to store it in the application or cache object. it is never updated.
    >
    > What's the besta container to improve performance and scalability, Cache

    or
    > Application object?
    >
    > Thanks in advance
    > Stefano Mostarda
    > Rom Italy
    >
    >
    >
     
    Janaka, Nov 17, 2003
    #2
    1. Advertising

  3. The Cache is the best place to store whatever you need. It is thread-safe,
    for one thing.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    Big Things are made up of
    Lots of Little Things.

    "stefano mostarda" <> wrote in message
    news:%...
    > Hi there,
    >
    > I have a question.
    >
    > In my application I have a table which is frequently used to fill a combo.

    I
    > want to store it in the application or cache object. it is never updated.
    >
    > What's the besta container to improve performance and scalability, Cache

    or
    > Application object?
    >
    > Thanks in advance
    > Stefano Mostarda
    > Rom Italy
    >
    >
    >
     
    Kevin Spencer, Nov 17, 2003
    #3
  4. stefano mostarda

    Alvin Guest

    Also application was provided for backward compatibility with asp classic
    and shouldn't be used going forward

    regards

    --


    -----------
    Got TidBits?
    Get it here: www.networkip.net/tidbits
    "Kevin Spencer" <> wrote in message
    news:...
    > The Cache is the best place to store whatever you need. It is thread-safe,
    > for one thing.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > http://www.takempis.com
    > Big Things are made up of
    > Lots of Little Things.
    >
    > "stefano mostarda" <> wrote in message
    > news:%...
    > > Hi there,
    > >
    > > I have a question.
    > >
    > > In my application I have a table which is frequently used to fill a

    combo.
    > I
    > > want to store it in the application or cache object. it is never

    updated.
    > >
    > > What's the besta container to improve performance and scalability, Cache

    > or
    > > Application object?
    > >
    > > Thanks in advance
    > > Stefano Mostarda
    > > Rom Italy
    > >
    > >
    > >

    >
    >
     
    Alvin, Nov 17, 2003
    #4
  5. stefano mostarda

    Jeff Guest

    Using the cache does require a little more work (but it is worth it).
    Basically, in your code, you read the cache. If you don't find the item,
    you have to build it and then load it into the cache. You cannot assume
    that the item will always be in the cache. This is because ASP.NET will
    start deleting items from the cache if it starts running out of memory.

    Once you get used to coding this way, it is pretty easier. And the Cache
    object is much more flexible than the Application object ever was.

    Jeff

    "Alvin" <vapordan_spam_me_not@hotmail_no_spamhotmail.com> wrote in message
    news:...
    > Also application was provided for backward compatibility with asp classic
    > and shouldn't be used going forward
    >
    > regards
    >
    > --
    >
    >
    > -----------
    > Got TidBits?
    > Get it here: www.networkip.net/tidbits
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > The Cache is the best place to store whatever you need. It is

    thread-safe,
    > > for one thing.
    > >
    > > --
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft MVP
    > > .Net Developer
    > > http://www.takempis.com
    > > Big Things are made up of
    > > Lots of Little Things.
    > >
    > > "stefano mostarda" <> wrote in message
    > > news:%...
    > > > Hi there,
    > > >
    > > > I have a question.
    > > >
    > > > In my application I have a table which is frequently used to fill a

    > combo.
    > > I
    > > > want to store it in the application or cache object. it is never

    > updated.
    > > >
    > > > What's the besta container to improve performance and scalability,

    Cache
    > > or
    > > > Application object?
    > > >
    > > > Thanks in advance
    > > > Stefano Mostarda
    > > > Rom Italy
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Jeff, Nov 19, 2003
    #5
  6. These articles may give you some insight.

    http://www.codeguru.com/net_asp/CacheSync.html

    http://www.fawcette.com/vsm/2003_05/magazine/columns/aspnet/



    "Jeff" <> wrote in message
    news:...
    > Using the cache does require a little more work (but it is worth it).
    > Basically, in your code, you read the cache. If you don't find the item,
    > you have to build it and then load it into the cache. You cannot assume
    > that the item will always be in the cache. This is because ASP.NET will
    > start deleting items from the cache if it starts running out of memory.
    >
    > Once you get used to coding this way, it is pretty easier. And the Cache
    > object is much more flexible than the Application object ever was.
    >
    > Jeff
    >
    > "Alvin" <vapordan_spam_me_not@hotmail_no_spamhotmail.com> wrote in message
    > news:...
    > > Also application was provided for backward compatibility with asp

    classic
    > > and shouldn't be used going forward
    > >
    > > regards
    > >
    > > --
    > >
    > >
    > > -----------
    > > Got TidBits?
    > > Get it here: www.networkip.net/tidbits
    > > "Kevin Spencer" <> wrote in message
    > > news:...
    > > > The Cache is the best place to store whatever you need. It is

    > thread-safe,
    > > > for one thing.
    > > >
    > > > --
    > > > HTH,
    > > >
    > > > Kevin Spencer
    > > > Microsoft MVP
    > > > .Net Developer
    > > > http://www.takempis.com
    > > > Big Things are made up of
    > > > Lots of Little Things.
    > > >
    > > > "stefano mostarda" <> wrote in message
    > > > news:%...
    > > > > Hi there,
    > > > >
    > > > > I have a question.
    > > > >
    > > > > In my application I have a table which is frequently used to fill a

    > > combo.
    > > > I
    > > > > want to store it in the application or cache object. it is never

    > > updated.
    > > > >
    > > > > What's the besta container to improve performance and scalability,

    > Cache
    > > > or
    > > > > Application object?
    > > > >
    > > > > Thanks in advance
    > > > > Stefano Mostarda
    > > > > Rom Italy
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Manit Chanthavong, Nov 19, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Nokes

    Cache::Cache Stale Segments

    Jeff Nokes, Sep 30, 2003, in forum: Perl
    Replies:
    0
    Views:
    582
    Jeff Nokes
    Sep 30, 2003
  2. DesignerX

    Page.Cache vs HttpContext.Current.Cache

    DesignerX, Jan 20, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    8,266
    vMike
    Jan 20, 2004
  3. =?Utf-8?B?b25l?=
    Replies:
    1
    Views:
    5,300
    Karl Seguin [MVP]
    Mar 8, 2006
  4. Sergey via DotNetMonster.com

    ASP.NET Cache vs Window System Cache

    Sergey via DotNetMonster.com, Nov 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    481
    Sergey via DotNetMonster.com
    Nov 15, 2006
  5. DK
    Replies:
    0
    Views:
    758
Loading...

Share This Page