New Posts New Posts RSS Feed: Caching Question
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Caching Question

 Post Reply Post Reply
Author
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Topic: Caching Question
    Posted: 12-Jul-2007 at 3:17pm
I suspect that what is going on here is that the query you are using has been cached.  When you make the query after you have modified the database (presumably by doing something like opening up SQL Server Management Studio and manually adding a new row), the PersistenceManager sees your query in the query cache and gets the items from the PersistenceManager cache.
 
If you want to see the new changes, you should use a QueryStrategy of DataSourceOnly, that will override the fact that the query is in the QueryCache.
Back to Top
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2007 at 3:17pm
I’m finally getting to the point that some basic testing is occurring on some of the UI code we have been creating.  During this testing, I’m finding something I guess I just don’t understand and am curious of what the best practice should be for caching.

Scenario:

I have list of items in the query cache for specific query, I may update this list or just view it.  While I’m on this UI, I go to the DB and say add, update or delete a row.  Let’s say I add one that should appear on this list the next time I query the data base.  I use the normal query strategy, and after I refresh by calling the same query, the new row never appears until I shutdown the app and re-load it.  Obviously, I’m missing something here.  I assume using the database query strategy that my cache is always refreshed directly from the backend and that would solve it but then I wouldn’t get a benefit of the caching?  Can you tell me how this should be done in the real world to offer the best performance and accuracy?

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down