By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,854 Members | 869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,854 IT Pros & Developers. It's quick & easy.

Cache object problem.

P: n/a
Hi,
I have problem related to Caching of data. I am reading large xml
file and putting this xml in dataset, since this dataset will contain
many datatable's inside. And each datatable might be big in data. Each
user will contain its seperate xml file, so when I create xml file for
each user, I am putting this xml DataSet in Cache object, but when I
try to populate my controls using Cache object, I am faching weired
problem. As some times it populates the controls and some times it
doesnt, although the xml files have been created for that user.
Along with this I am using same cache object name for every user.

So please tell me what could be the reason for cache is not able to
populate the controls on some time.???and what could be best usage for
concurrent users??Sessions or Cache??

Thanks in Advance.
Manoj Singh

Sep 21 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Cache items are stored at the Application level, i.e. all users sharing this
space.
Session items are stored at the Session level, i.e. isolated space per user.

if you use the same name with Cache you will get confusing results. i
believe the cache allows multiple objects to be stored with the same name if
you use Cache.Add, but when you request Cache["whatever"] you can't really
expect to get the right one then.

be careful putting large datasets in memory for every user. that may scale
horribly on your server unless your number of users is fixed at a small
number.

i hope this helps
tim

"Aryan" <ma*********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
Hi,
I have problem related to Caching of data. I am reading large xml
file and putting this xml in dataset, since this dataset will contain
many datatable's inside. And each datatable might be big in data. Each
user will contain its seperate xml file, so when I create xml file for
each user, I am putting this xml DataSet in Cache object, but when I
try to populate my controls using Cache object, I am faching weired
problem. As some times it populates the controls and some times it
doesnt, although the xml files have been created for that user.
Along with this I am using same cache object name for every user.

So please tell me what could be the reason for cache is not able to
populate the controls on some time.???and what could be best usage for
concurrent users??Sessions or Cache??

Thanks in Advance.
Manoj Singh

Sep 21 '06 #2

P: n/a
Thanks Tim,
I am using Cache.Insert() and setting sliding expriation and
dependancy. But the problem is, I am using the same Cache key for every
user, although each user will have his different xml file. So my
confusion was, right now I am testing my application with single user,
which creates only single xml file. But in this case also why my
controls are not populating sometimes and sometimes it does populate
nicely..
Can you please suggest me what could be the probable reason for the
same.

Thanks Again,

Sep 22 '06 #3

P: n/a
hi Aryan,
yes i understand your problem. you are accidentally overwriting cache values
between users.

if you don't like using Session objects, or if you really need the Sliding
expiration, or CacheDependency, you could use a key naming convention of the
form <Username>_<KeyName>.

this should do it for you.

tim
"Aryan" <ma*********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
Thanks Tim,
I am using Cache.Insert() and setting sliding expriation and
dependancy. But the problem is, I am using the same Cache key for every
user, although each user will have his different xml file. So my
confusion was, right now I am testing my application with single user,
which creates only single xml file. But in this case also why my
controls are not populating sometimes and sometimes it does populate
nicely..
Can you please suggest me what could be the probable reason for the
same.

Thanks Again,

Sep 22 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.