June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to improve Web service performance by caching the return value of a Web method.
Use response caching by setting the CacheDuration property of the WebMethod attribute.
ASP.NET Web services support response caching in much the same way as ASP.NET Web pages. When response caching is enabled, your code runs only once, and the return value of the Web method is stored for subsequent method invocations. With Web forms, caching is performed on a per-form basis. With Web services, caching is enabled and configured distinctly for each Web method.
For example, the following Web method returns the current date and time on the server. This information is cached for one minute, meaning that subsequent requests ...
Read now
Unlock full access