Does WCF cache stored procedure save

I have a WCF service that my client makes a call to tell her to run storedprocedure1, with param1, param2, etc.

When the WCF service receives this call, it creates an instance of the class that creates the DAO class. The DAO class creates a connection, loads the parameters into the object SqlCommand, and then executes the object.

Upon completion, it closes SqlConnectionbut does not close or delete the DAO class because it needs to complete several procedures.

Here is the problem. If I edit storedprocedure1and then call it through the WCF service, the changes I made to storedprocedure1are not reflected until I restart the WCF service. Its both storedprocedure1cached in WCF.

Has anyone else experienced this and is there a solution?

+3
source share
2 answers

I think the key probably lies in this statement:

but does not close or delete the DAO class

Without seeing the code for your DAO class, it's hard to say, but most likely the query result is cached by your data access level than it does, that it is cached by WCF.

In any case, it really has nothing to do with the stored procedure, it just caches the result of the stored procedure. If you changed the data instead of changing the procedure, the same problem should exist - you are returning outdated data.

0
source

I think the WCF service caches the results of the stored procedure.

See this: http://msdn.microsoft.com/en-us/library/ee230443.aspx

+2
source

All Articles