Caching Data
Learn to cache requests.
We'll cover the following...
In this section, we are going to cache requests for getting a question. At the moment, the database is queried for each request to get a question. If we cache a question and can get subsequent requests for the question from the cache, this should be faster and reduce the load on the database. We will prove this with load tests.
Load testing the current implementation
Before we implement caching, we are going to load test the current implementation of getting a single question using the following steps:
Let's start our REST API by pressing “F5” in Visual ...