For a simple rss reader, I am storing the results of queries in a client side (google gears) database.
So, myapp.php?query=xyz is stored in one column, and the result xml is stored in the next column.
Then, when myapp.php?query=xyz is requested, I first attempt to load from the cached content in the second column.
I need to figure out when I should replace/refresh/overide that cached content with content from the server.
I also need to figure out when to update the displayed data.
Should I replace the cache in the background, after displaying the cached content, and then the user sees it next time they navigate to that screen?
Should I show the cached content and then replace the content "before their eyes" when the server returns new data?
What is the appropriate point to 1) replace the cache with new data 2) update the displayed data
Any help would be greatly appreciated!