When the system is launched, issues that are not noticed during normal development come one after another...
Today, I encountered a problem. Because of the page cache problem, the user did not set the browser to clear the page cache. As a result, the ticket numbers of many application forms are the same...
The final problem is solved. Although it is not solved, I would like to take this opportunity to learn how heroes solve the cache problem.
1. disable Client caching
<Meta HTTP-EQUIV = "Pragma" content = "no-Cache">
<Meta HTTP-EQUIV = "cache-control" content = "no-cache, must-revalidate">
<Meta HTTP-EQUIV = "expires" content = "wed, 26 Feb 1997 08:21:57 GMT">
2. Disable caching on the dynamic web page of the server. Add the following content:
Response. setheader ("Pragma", "No-Cache ");
Response. setheader ("cache-control", "No-Cache ");
Response. setdateheader ("expires", 0 );
The first two have been tried .... Finally, my colleagues used the filter to solve the problem.
(Httpservletresponse) Response). setheader ("Pragma", "No-Cache ");
(Httpservletresponse) Response). setheader ("cache-control", "No-Cache ");
(Httpservletresponse) Response). setheader ("expires", "0 ");
I didn't think of filters, but I still learned something.
Page cache troubles