473,513 Members | 4,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cache object problem.

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
3 1912
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1500
by: Florian Lindner | last post by:
Hello, I am building a object cache in python, The cache has a maximum size and the items have expiration dates. At the moment I'm doing like that: cache = {} # create dictionary cache =...
0
1170
by: Neil Kimber | last post by:
Hi, I'm using the Cache object to persist some values between pages. I'm setting the expiration for 2 minutes. I'm actually storing Bitmap streams in the cache. In this way, one page can draw an...
1
2496
by: Joe Fallon | last post by:
I am trying to setup a cache that refreshes itself every hour. (My sample code is for every minute so I can test it.) I have found some examples that I thought worked but they all seem to fail....
1
3164
by: Glenn | last post by:
Hi, I have a config XML file that I am using from the application cache. I have configured the entry with a remove callback to re-populate cache automatically when the XML file changes. All is...
4
5337
by: Mat | last post by:
Hi, I've stumbled onto a problem when using the caching object in ASP.Net. I'm placing a static dataset to the cache as the data only changes once a day. Whilst writing to the cache I'm using...
13
1760
by: Fernando Chilvarguer | last post by:
Hi, I'm retriving data from a database and storing it on the Cache Object using the following code: HttpContext.Current.Cache.Insert( cacheItemKey, contentDS, //THE DATASET WITH MY DATA...
1
2688
by: William Sullivan | last post by:
I'm trying to nail down some issues with the cache in my application. Currently, I have an object that stands between my business logic and database logic called CacheLogic (cute, no?). ...
5
2106
by: Arjen | last post by:
Hi, I'm using the cache block of the enterprise lib Jan. 2006. There is somethings strange going on. I add a varable to the cache, let's say the string myData. string myData = "1111111";...
2
2646
by: moondaddy | last post by:
I had to repost this because I had to update and change my msdn alias. I will re-ask the question and clarify a few things that were not clear before. This code is all executed on my dev...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.