Hi,
i've got the problem that i implemented a WCF-service which is using LINQ entities... To generate the content of the response to a service call, requires a high amount of LINQ/SQL selects...
Whatever, the service is not doing any updates or inserts to the DB, so i'd like to implement a kind of "caching" of the LINQ entities ( also the DB-content is not growing in the millions... it will indeed be limited to about 63.000 mainentries ( with sub-dependancies ) like User -> Orders )
Also the service response does not have to contain the 100% up2date data, so updates of the data in the background shouldn't be anything to think about here
Ok, so currently my plan is as follows:
- Grab ALL the relevant tables from the database with LINQ so it has all the objects "cached" ( the ToList() function should do it, right? )
- Replace the entity object via a kind of smart threading every x-minutes/hours ( like grabbing the data from db again, lock the currently cached linq-DataContent and replace it with the new one.. )
So, what is your opinion... do you think i should/could do it like this? I really need to increase the responsetime of the service, but optimizing the SQL ( e.g. lesser amount of selects ) is not really an option for me, as all the LINQ stuff is already implemented..
Thanks in advance!