Caching Hashtables

G

Guest

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.
 
Y

Yunus Emre ALPÖZEN [MCSD.NET]

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
 
T

Tim_Mac

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
 
T

Tim_Mac

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
 
Y

Yunus Emre ALPÖZEN [MCSD.NET]

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top