Caching Hashtables

Discussion in 'ASP .Net' started by =?Utf-8?B?U3VuZGFyYXJhamFu?=, Jul 24, 2005.

  1. Dear Folks,
    Is that possible to cache Hash tables in .Net (using
    System.web.caching.cache).
    is there any other structure available so that i can store key value pairs
    and cache it.

    --
    S.Sundararajan
    =?Utf-8?B?U3VuZGFyYXJhamFu?=, Jul 24, 2005
    #1
    1. Advertising

  2. if want to store distinct values for each session, u should use Session
    object,
    otherwise u may use application and cache objects the choice..

    But the best way (including web farms), serialize your hashtable to SQL
    server..


    --
    HTH

    Thanks,
    Yunus Emre ALPÖZEN
    BSc, MCSD.NET

    "Sundararajan" <> wrote in message
    news:...
    > Dear Folks,
    > Is that possible to cache Hash tables in .Net (using
    > System.web.caching.cache).
    > is there any other structure available so that i can store key value pairs
    > and cache it.
    >
    > --
    > S.Sundararajan
    Yunus Emre ALPÖZEN [MCSD.NET], Jul 24, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?U3VuZGFyYXJhamFu?=

    Tim_Mac Guest

    hi,
    just to emphasise what yunus said.. the application state and cache
    objects *are* designed to store key/value pairs so they are ideally
    suited to your task. the hashing is done internally.
    one thing about the .net cache object is that it will expire after
    around 10 minutes of inactivity on the site, even if you set a cache
    expiration for a longer time. i develop sites for small businesses who
    don't have constant traffic, so i prefer to use the application state
    because it does not expire until IIS restarts.

    hth
    tim
    Tim_Mac, Jul 24, 2005
    #3
  4. =?Utf-8?B?U3VuZGFyYXJhamFu?=

    Tim_Mac Guest

    hi,
    just to emphasise what yunus said.. the application state and cache
    objects *are* designed to store key/value pairs so they are ideally
    suited to your task. the hashing is done internally.
    one thing about the .net cache object is that it will expire after
    around 10 minutes of inactivity on the site, even if you set a cache
    expiration for a longer time. i develop sites for small businesses who
    don't have constant traffic, so i prefer to use the application state
    because it does not expire until IIS restarts.

    hth
    tim
    Tim_Mac, Jul 24, 2005
    #4
  5. For the problem u indicate expiration of .net cache object is reasoned IIS
    configuration. U should set your application Session timeout: using inetmgr.
    (Right Click your application choose home directory tab and click
    configuration choose options tab from new window and set session timeout..)

    --
    HTH

    Thanks,
    Yunus Emre ALPÖZEN
    BSc, MCSD.NET

    "Tim_Mac" <> wrote in message
    news:...
    > hi,
    > just to emphasise what yunus said.. the application state and cache
    > objects *are* designed to store key/value pairs so they are ideally
    > suited to your task. the hashing is done internally.
    > one thing about the .net cache object is that it will expire after
    > around 10 minutes of inactivity on the site, even if you set a cache
    > expiration for a longer time. i develop sites for small businesses who
    > don't have constant traffic, so i prefer to use the application state
    > because it does not expire until IIS restarts.
    >
    > hth
    > tim
    >
    Yunus Emre ALPÖZEN [MCSD.NET], Jul 30, 2005
    #5
    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. Andrew Sweetman

    Manipulating HashTables

    Andrew Sweetman, Aug 22, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,195
    Steve C. Orr, MCSD
    Aug 22, 2003
  2. Replies:
    1
    Views:
    506
    Karl Seguin
    Oct 17, 2005
  3. J.Eddy

    Java Hashtables

    J.Eddy, Jul 16, 2003, in forum: Java
    Replies:
    3
    Views:
    482
    Roedy Green
    Jul 17, 2003
  4. Replies:
    2
    Views:
    346
  5. Replies:
    3
    Views:
    360
    Roedy Green
    Sep 29, 2005
Loading...

Share This Page