Cache management in [[Performance Testing]] involves verifying the configuration of both client caches (such as the cache in a web browser) and application server caches and making any necessary changes to optimize the efficiency of the system as a whole.
It is and important consideration in a load test because it would take a server far less time and resources to serve up a cached response compared to treating the request as a new one. Cache management in load testing attempts to mimic the application's caching rules in production.
There are valid reasons to have cache disabled and enabled.
- Enabled: To simulate a user that logs in and then browses the application, maintaining browser cache if they visit a page they've already visited.
- Disabled: To simulate completely new users that perform actions and then stop using the app. In this way, a single virtual users could simulate many new users.
## Effect on [[Performance]]
Having a cache decreases overall response times.
## Related
- What is a [[Cache]]?
- [[Cache]]
- [[Cache Headers]]
- [[Cache management in JMeter]]
- [[Cache management in Gatling]]
- [[Caching in k6]]