473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

<newbie> using cache when objects in cache is modified

hi

asp.net 2.0

In a webpage I have a GridView displaying a collection of data. This
collection of data is a collection of objects based on a custom class. where
each object represent a record in the database..

this collection is stored in the cache so that maybe next time a trip to the
database isn't needed

If I modify data in the GridView: I have a ButtonLink in my GridView, when I
click on it a field in the database is updated.
After this update is done nothing is displayed, that's because the GridView
gets the data from the cache... Only when cache is outdated (1 hour) a full
read from database is done and a new cache is created.....

But I'm wondering if it's good practice to when a object like this is
modified to loop through the entire cache and remove the modified object and
replace it with the updated version?
Oct 16 '08 #1
2 1003
what if I instead of removing the object in cache, I just give it the new
value which was placed in the database... then I don't need to remove the
object and insert a new object....good approach?
Oct 16 '08 #2
"what if I instead of removing the object in cache, I just give it the new
value which was placed in the database... then I don't need to remove the
object and insert a new object....good approach? "

I guess that is a bad solution. Because items are sorted based on this
column in my GridView. If I update this field then perhaps this row should
be removed from this page. because my GridView has enabled paging and this
row should be on another page after this update..... any suggestions?
Oct 16 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

129
by: Torbjørn Pettersen | last post by:
I've started cleaning up my HTML and implementing CSS. So far I've used FrontPage, but am switching over to DreamWeaver. Reading a bit on W3Schools.com and W3.org I see there are a lot of HTML...
6
by: Bonge Boo! | last post by:
This has got to be obvious, but I can't make it work. I have a form called with 3 pull down menus. They are linked to a database which generates the values for the <SELECT? Pull-downs. Lets...
3
by: | last post by:
I have been researching articles on google on how to create a simple RSS feed that sucks <title><blurb><link><date> out of a sql server 2000 database via an aspx page. I know it has to be pushed...
5
by: Jim in Arizona | last post by:
How do I find a control within a datalist itemtemplate from a sub procedure that isn't a normal called procedure from a datalist (like the update, edit, or cancel procedures)? For instance,...
1
by: Jeff | last post by:
hi asp.net 3.5 (project upgraded from asp.net 2.0). are using vwd2008 express now This is my first ajax attempt. The code below shows a TextBox and a ListBox. The idea I was trying to...
3
by: Jeff | last post by:
hi asp.net 2.0 i've used connectionstrings like this one for my webproject: connectionString="Server=Pdc1;Database=Testing;Integrated Security=false;User ID=tester;Pwd=hardtoguesspwd;" /> ...
0
by: Jeff | last post by:
Hi I'm following this tutorial: http://dev.live.com/gadgets/sdk/docs/default.htm And downloaded that sample file. Now I've created a simple web gadget project on my own:. I just made a copy...
4
by: Jeff | last post by:
Hi asp.net 2.0 I'm trying to implement a HyperLinkField into my GridView.. The SqlDataSource returns a field which is paths to files (each row in the GridView should have link to a file). ...
3
by: Jeff | last post by:
hi I'm wondering how to open a web browser window in VS2008. I've created a simple windows Live Agent and just want to test it in the VS2008 before I deploy it... any ideas how to open a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.