Has anyone noticed why the repository in the new WebAPI does not refresh each time a Get request is made? I don't see anything referencing anything like a cache, however, I don't see the data refreshed every time. It is very inconsistent. Any ideas why?
Asked
Active
Viewed 89 times
0
-
2Which repository are you talking about? Who makes the request? It's really hard to understand what you need without more details. – carlosfigueira Sep 20 '12 at 20:17
-
You should show your code in here – cuongle Sep 21 '12 at 07:29
1 Answers
0
I had a similar problem and what was happening is that the Database Context was not being disposed after the queries. Check if you're disposing your objects after the connection.
This example helped me on disposing and creating a context per request, the same applies for WebAPI's so they don't keep on the memory and refreshes for every request.

benjamingranados
- 438
- 5
- 15