Page History
HTTP caching is one of the most essential mechanisms of increasing website performance. It allows to substantially reduce bandwidth and offload the server from sending resources cached on the client. Users with empty cache and users with primed cache impact the Webservers load differently. While HTTP caching is an essential factor impacting server load, it is frequently overlooked in load testing.
StresStimulus provides a comprehensive mechanism of emulating the browser caching factor. The Cache-Control property allows configuring a mix of virtual users with different browsing history (cache) management. Every VU can either have cache enabled or disabled.
- A VU with a disabled browser cache will send all recorded requests on all iterations without any HTTP caching headers. For every request, the server is expected to send a full response.
- A VU with enabled browser cache will send requests based on the caching rules. These rules are determined for every request after recording a test case and can be changed as described below.
There are two flavors of a VU with enabled cache: new user and returning user.
|
Note |
---|
Note: The caching rules are determined by the server's recorded response headers. For information about browser caching rules, see RFC 2616, Caching in HTTP. |
Disabling the Cache-Control will render all VUs with disabled browser caches. Enabling the browser cache will render all VUs with enabled browser caches. In this case, the New VU % property will appear. It is used to emulate the proportion of new vs. returning users. Cache-control properties are summarized in the table below:
Property | Value | Description |
---|---|---|
Cache-Control | Disabled | Every VU will not emulate browser cache capabilities. Every request will be sent, and every request will have recorded caching headers removed. |
Cache-Control | Enabled | Every VU will emulate browser cache capabilities. Every VU can emulate storing resources in the browser cache for further subsequent iterations. See below for further options. |
New VU% | A number between 0 and 100% | The percent of VUs that will be new with cache enabled. The rest will be returning with cache enabled. This setting is only available with Cache-Control enabled. |
Note |
---|
Note: Cache properties described in this section are not available on the Test Case level if Test Case Groups are used. In this case, these properties are available in the Test Case Group section (see Sequential Test Case Groups). |