Well, I have a rather complicated silverlight application that gets its data from the WCF service (asp.net service level), which, in turn, calls the data layer, which calls stored procedures in the SQL 2005 database to retrieve the necessary data, So, round trip is as follows:
Silverlight App β WCF Service β Data Layer β DB β Data Layer β WCF Service converts a data object to the corresponding DTO (data transfer object) or List <> this β Silverlight App
Most of the data is very relational (therefore, it must exist in the database), but it will change infrequently. It seems that I have several options for places to cache this βsemi-permanentβ data:
- I can cache it in the data layer. My data layer is already set up to use the SQLDependency class and cache the results from a stored procedure call. I think this or maybe the application level cache.
- I can cache the resulting DTO in the application cache (or session level depending on the call) in the WCF service itself. 2 (a) I could even do this even further by serializing the XML for the received DTO (s) to a file on the WCF service side so that I can (a) check the memory cache, then (b) check the file cache and (c) click per data layer
- I could do something similar to 2 (a) with isolated client-side storage in an SL application. I could serialize the data in local isolated storage using a hash (or moddate or something else) and then just call to check this.
, : WCF IIS7 , gzip-ed ( ) XML-. , , , IIS gzip-ed , . , , .
, - - " ", , . Do X, Test Performance Y, do Z, , .
( , ):
WCF