Freigeben über


Disabling caching of all dependent requests

 In a previous blog post here: https://blogs.msdn.com/billbar/archive/2007/01/22/simulation-of-browser-caching-in-vsts-load-tests-and-web-tests.aspx, I described the behavior of caching with VSTS 2005.   

 With VSTS 2008, the default caching behavior is the same.   However, with VSTS 2008, if you want completely disabling caching of all dependent requests and always fetch them, you can so by adding the following WebTestPlugin to your Web test:

    public class WebTestPlugin_DisableDependentCaching : WebTestPlugin

    {

        public override void PostRequest(object sender, PostRequestEventArgs e)

        {

            foreach (WebTestRequest dependentRequest in e.Request.DependentRequests)

            {

                dependentRequest.Cache = false;

            }

        }

    }

Comments