PHP Classes

File: example3.php

Recommend this page to a friend!
  Classes of Rubens Takiguti Ribeiro   Auto Expires   example3.php   Download  
File: example3.php
Role: Example script
Content type: text/plain
Description: Example of cache on time expired
Class: Auto Expires
Set HTTP headers to control browser cache
Author: By
Last change:
Date: 11 years ago
Size: 420 bytes
 

Contents

Class file image Download
<?php
/**
 * Example of usage of class AutoExpires.
 * @author Rubens Takiguti Ribeiro <rubs33@gmail.com>
 */
require_once('AutoExpires.class.php');

// Configure to check if cache time was expired (do not check content modification)
AutoExpires::setCacheTime(10);
AutoExpires::setStrategies(array('if-expired'));

// Start
AutoExpires::start();

// Print the document
echo 'Dynamic content: ' . $_GET['value'];
exit(
0);