.NETGURU
Performance of Caching Data
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcache' list.


Scott Mahler
-- Moved from [aspngdatagridrepeaterdatalist] to [aspngcache] by Bob Levittan <Click here to reveal e-mail address> --

Hi all,
I have a performance question.

I have a report that will be returning two Different Datasets.

The report will probably be using a DataGrid, and I will be using the =
sorting properties of the DataGrid.

My question is this.

After I initially get the datasets from the SQL server and populate the =
DataGrid on the PageLoad Event,
Does it make sense to cache the Datasets.
Then if someone needs to change the sort, it goes to the Cache to get =
the Datasets, instead of having to go back to the SQL server.

Is this what people are doing?
Can someone show me an example of how it would be done?

After the page closes, What happens to the Cache? does it need to be =
destroyed?

Or do I just go back to the SQL box to get the data

TIA

Scott

Reply to this message...
 
    
Mickey Williams
It seems like what you're describing here is a scenario where you want a
single user to have access to the datasets for the purpose of supplying
different sort views to the grid. If that's the case, just stash a reference
to the datasets into session variables, and use a DataView to provide
different sort orders.

Use the cache with your datasets if you want other sessions to have access
to the datasets. Also, you can use the cache if you want to use cache
management features like the ability to expire due to a file dependency or
time-based expiration.

[Original message clipped]

The cache is maintained until it times out, is flushed due to memory
pressure, is flushed due to a dependency, or until you whack it. Whatever
comes first :)

---
Mickey Williams
www.CodevTech.com
www.DotNetExperts.com

----- Original Message -----
From: "Scott Mahler" <Click here to reveal e-mail address>
To: "aspngcache" <Click here to reveal e-mail address>
Sent: Saturday, March 23, 2002 10:10 AM
Subject: [aspngcache] Performance of Caching Data

> -- Moved from [aspngdatagridrepeaterdatalist] to [aspngcache] by Bob
Levittan <Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
    
SimpleTin
Hi,
I think another option would be to provide a mechanism to allow the user
to store frequently used queries and sorts into either 1. A database or
2. an xml document. 8 times out of 10 a users thinks that their order is
better then yours. By making it flexible then you can provide enhanced
service to your customer base.

Simple

-----Original Message-----
From: Mickey Williams [mailto:Click here to reveal e-mail address]
Sent: Saturday, March 23, 2002 12:23 PM
To: aspngcache
Subject: [aspngcache] Re: Performance of Caching Data

It seems like what you're describing here is a scenario where you want a
single user to have access to the datasets for the purpose of supplying
different sort views to the grid. If that's the case, just stash a
reference
to the datasets into session variables, and use a DataView to provide
different sort orders.

Use the cache with your datasets if you want other sessions to have
access
to the datasets. Also, you can use the cache if you want to use cache
management features like the ability to expire due to a file dependency
or
time-based expiration.

[Original message clipped]

The cache is maintained until it times out, is flushed due to memory
pressure, is flushed due to a dependency, or until you whack it.
Whatever
comes first :)

---
Mickey Williams
www.CodevTech.com
www.DotNetExperts.com

----- Original Message -----
From: "Scott Mahler" <Click here to reveal e-mail address>
To: "aspngcache" <Click here to reveal e-mail address>
Sent: Saturday, March 23, 2002 10:10 AM
Subject: [aspngcache] Performance of Caching Data

> -- Moved from [aspngdatagridrepeaterdatalist] to [aspngcache] by Bob
Levittan <Click here to reveal e-mail address> --
[Original message clipped]

| [aspngcache] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngcache.asp = JOIN/QUIT

Reply to this message...
 
    
Mickey Williams
These suggestions are all orthogonal to caching. If you store a user
preference in an XML file or a database, you'll still need to perform the
necessary IO to pick up that data, massage it, render it as HTML, and send
it to the user. None of these other approaches is available to other
sessions, and none of these approaches reduces server workload. There's also
nothing that prevents user preferences from being cached, even if you're
using simple full-page caching for a URL like this one:
foo.aspx?sort=state
Just varyby the sort query string - each sort value will result in a unique
cached representation.

---
Mickey Williams
www.CodevTech.com
www.DotNetExperts.com

----- Original Message -----
From: "SimpleTin" <Click here to reveal e-mail address>
To: "aspngcache" <Click here to reveal e-mail address>
Sent: Saturday, March 23, 2002 12:36 PM
Subject: [aspngcache] Re: Performance of Caching Data

[Original message clipped]

Reply to this message...
 
 
System.Data.DataView
System.Web.UI.WebControls.DataGrid
System.Windows.Forms.DataGrid




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification