Caching problem !! RRS feed

  • Question

  • User1203171364 posted


    When I'm creating ... let's say, a new product (it can be anything like users, orders .. etc) ,

    I can see it added successfully to the table in the page but somehow it's missing in the filters (above the table) select boxes.

    I'm assuming this problem happens due to a caching machanism built into the Dynamic-Data controls - please correct me if i'm wrong on this one !!??

    The quick workaround for this problem will be to disable the caching for the whole project but I can't seem to get it disabled =/

    Any help is appreciated ..

    Thanks in advance.

    Monday, November 17, 2008 10:03 AM

All replies

  • User1203171364 posted

    Simply put, How can i stop LinqDataSource from caching the results from SQL-Server?

    Thanks again.

    Monday, November 17, 2008 2:54 PM
  • User-1005219520 posted

    Hi Itay,

    Can you reproduce this problem with the Northwind or Adventureworks DB. Explain exactly what you are doing and the behavior you expect.

    Monday, November 17, 2008 3:46 PM
  • User1203171364 posted

    I can try to explain it better and hopefully help you help me.

    In a Dynamic-Data project there's a dynamic page called ListDetailsTemplate (located under: App_shared/DynamicDataPages/ListDetailsTemplate.aspx).

    That page is consisted with two main objects: 1 .asp:DynamicFilterRepeater (filtering the GridView), 2.asp:DynamicGridView (showing the data)

    so far so good.

    When i'm adding or deleting a product i can see it has been successfully added or deleted from the GridView control but the DropDownList in the DynamicFilterRepeater doesn't show any change at all !

    The change appears after i do a "iisreset" from the command line - which simply tells me that it's a caching/session/whatever problem =/ and i can't seem to find a workaround for it.

    Also, another symptom i've come to notice is:

    When i do "iisreset" and refresh the page i can see 5 queries are being executed in the SQL-Server (through the SQL-Profiler tool)

    and in the next refresh there are only 3 queries executing which also point out to a caching issue.

    I don't mind the performance - i just want the data fully synchronized.

    Hope it explains it a bit better.

    Monday, November 17, 2008 4:36 PM
  • User-1005219520 posted

    You should never need to reset the IIS server to see new data. IIS is not caching the data unless you've set up the OutputCache  (off by default).  Can you disable the OutputCache to verify this? The DynamicFilterRepeater (FR) only displays FK's and booleans. See if you can duplicate your problem with the AdventureWorksLT DB. Because the  FR only displays FK's and booleans, once you deleted or inserted a row you would not see any change to the FR unless the entity had a FK into itself (such as the ProductCategory table in the AdventureWorksLT DB.

    Monday, November 17, 2008 5:59 PM
  • User-1005219520 posted

    I just tested this on Windows 2008 with the AdventureWorksLT DB.  I inserted a new address entity with address 123 easy street  in the address entity(table), I then navigated to the CustomerAddress page - the FR did show the new address.

    Monday, November 17, 2008 7:43 PM
  • User1641955678 posted

    I think you may be using a very old build of DynamicData (and we did indeed have this caching bug way way back).  The only supported release right now is the one that comes with Framework 3.5 SP1.  Where did you install from?


    Monday, November 17, 2008 8:56 PM
  • User1203171364 posted

    First of all, thank you guys for the replies !

    I've installed .Net Framework 3.5 sp1 and reproduce the problem with AdventureWorks.

    The case i'm having troubles with is a "Same table relation", just like the Employees table in AdventureWorks.

    Unfortunately the problem remains, both for my DB and AdventureWorks.

    The project's references are as follows:

    System.Data.Linq, System.Data.DataSetExtensions, System.Web.Extensions - All are in the same version with a runtime version v2.0.50727

    Anything else I can check ?

    Tuesday, November 18, 2008 6:28 AM
  • User1203171364 posted

    After watching the new getting started videos on dynamic-data here I've noticed it's a totally different project structure than what I have;

    so I just installed "Visual Studio 2008 sp1" which solved the problem by creating the Dynamic-Data project with the correct release version.

    Thanks again for all your help !!

    Tuesday, November 18, 2008 8:49 AM