You want to improve Web service performance by caching some data, but you need to reuse cached data among several methods. Or, you want to run your Web method code but still use some cached information.
Store any object in the cache using the Cache object.
Data caching with a Web service works almost exactly the same as the Web page data caching technique described in recipe Store Arbitrary Data in the ASP.NET Cache. In fact, you can store data in the cache using Web page code and retrieve it in a Web service, or vice versa. Data caching supports two types of expiration policy: absolute expiration and sliding expiration. For more information, refer to recipe Store Arbitrary Data in the ASP.NET Cache.