home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / test2.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  487 b   |  26 lines

  1. <?php
  2.  
  3. // Test script of Cache_Lite_Output
  4. // $Id: test2.php,v 1.3 2002/09/28 18:05:29 fab Exp $
  5.  
  6. require_once('Cache/Lite/Output.php');
  7.  
  8. $options = array(
  9.     'cacheDir' => '/tmp/',
  10.     'lifeTime' => 10
  11. );
  12.  
  13. $cache = new Cache_Lite_Output($options);
  14.  
  15. if (!($cache->start('123'))) {
  16.     // Cache missed...
  17.     for($i=0;$i<1000;$i++) { // Making of the page...
  18.         echo('0123456789');
  19.     }
  20.     $cache->end();
  21.     echo('<br>Cache Missed !');
  22. } else {
  23.     echo('<br>Cache Hit !');
  24. }
  25.  
  26. ?>