This is my EmployeeDetailsController.cs
namespace EmpApi.Controllers
{
[RoutePrefix("")]
public class EmployeeDetailsController : ApiController
{
[HttpGet]
[Route("Employees")]
public IEnumerable<Employee> Employees()
{
}
[HttpGet]
[Route("Details/{id}")]
public IEnumerable<Details> Details(int id)
{
}
[HttpGet]
[Route("TeamInfo/{id}")]
public IEnumerable<Team> TeamInfo(int id)
{
}
[HttpGet]
[Route("DetailsForTeam/{id}")]
public IEnumerable<Details> DetailsForTeam(int id)
{
;
}
[HttpPost]
[Route("PostEmp")]
public void PostEmp([FromBody] Employee cs)
{
}
[HttpPut]
[Route("PutEmp/{id}")]
public void PutEmp(int id, [FromBody]Employee cs)
{
}
[HttpDelete]
[Route("DeleteEmp/{id}")]
public void DeleteEmp(int id)
{
}
}
}
I made an API which has various services. Suppose i call api/Employees,after i call api/Details/12 and then when i click GoBack button in browser, api/Employees should not be triggered. How do i enable cache for my API.Please tell me the steps as I am new in WebApI. Thanks in advance..