File: cache-control.php

package info (click to toggle)
siege 4.1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,676 kB
  • sloc: ansic: 13,015; sh: 9,149; makefile: 160; php: 142; perl: 11
file content (16 lines) | stat: -rw-r--r-- 450 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
  $secs = 30;
  header("Cache-Control: s-maxage=$secs, max-age=$secs, must-revalidate, proxy-revalidate");
?>
<html>
<head><title>SIEGE: Cache control</title></head>
<body>
<h2>Siege Cache-Control</h2>
This page sets a max-age cache control for <?php echo $secs?> seconds. The header looks like this:<br>
<code>
Cache-Control: s-maxage=<?php echo $secs?>, max-age=<?php echo $secs?>, must-revalidate, proxy-revalidate
</code>
</body>
</html>