cached function call with Cache_Lite
Source code
1
<?php
2 require('./.config.php');
3 include('./.fetch_xml_with_socket.php5');
4 require_once('Cache/Lite/Function.php');
5 $options = array(
6 'cacheDir' => './cache/',
7 'lifeTime' => 3600,
8 //'pearErrorMode' =>''
9 );
10
11 $cache = new Cache_Lite_Function($options);
12 $data = $cache->call('fetchRss',"rss.news.yahoo.com","/rss/oddlyenough");
13 echo '<pre>', htmlspecialchars($data), '</pre>';
14 include('./.footer.php')?>
Output
Warning: require_once(Cache/Lite/Function.php) [function.require-once]: failed to open stream: No such file or directory in /home/davidmintz/www/davidmintz.org/php_course/examples/10/function_cache_lite.php5 on line 4
Fatal error: require_once() [function.require]: Failed opening required 'Cache/Lite/Function.php' (include_path='/usr/home/dmintz/inc/pear:.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/davidmintz/www/davidmintz.org/php_course/examples/10/function_cache_lite.php5 on line 4