[thelist] ASP.NET: Really Weird Thing - Cache?

Casey aspnet at thecrookstons.com
Tue Jan 17 12:56:02 CST 2006


http://www.jewelfire.com/test/products.aspx?category1=1

Hello everyone.  The oddest thing is going on, and I am stumped as to how to 
track down this error.  In the page above, we are viewing products 1-15 of 
199 possible products.  At the bottom you'll notice the links to move from 
page to page to view more products in the same category.  The series of 15 
product images and links is built as follows:

1) All images from a category are placed into a DataTable.
2) The DataTable is cached.
3a) Based on the page the user has requested, a DataView is created and 
loaded with a filtered set of 15 records from the cached DataTable
3b) Before 3a is performed, we check to make sure that the cached DataTable 
is not empty.  If it is, we rebuild it.
4) The DataView is written to the page.

I did it this way because I did not want to have to re-create the DataTable 
each time the user moves from page to page within the same category.  I also 
did it this way because it seemed easier (and took less trips to the server) 
to only perform one simple query the first time a user requests a category 
instead of a very complex query every time the user changed pages.

Now, here's where things get odd.  If you go to the above page in IE and 
then start scrolling through the pages, you will notice that after one, or 
two, or three, or four clicks, all of the images vanish.  If you go to the 
page in FireFox, the images do vanish, but only after about 90+ clicks on 
the paging links.  Even more odd, is that this weird vanishing trick NEVER 
happens on my development server.  Never.  In either browser.

What gives?  How can I track down an error that occurs on one server but not 
another, is inconsistent, and behaves differently in different browsers?  I 
would assume the problem is stemming from the cached DataTable, but then 
again, if it's empty, it is told to rebuild.

I am stumped.

Casey 




More information about the thelist mailing list