PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Bigboy177
Worker
Worker


Joined: Jul 07, 2004
Posts: 192

PostPosted: Sat Sep 24, 2005 6:10 am Reply with quote Back to top

First you have to ofcourse have the cache lite installed, and the pear library... Cache Lite can be found here:

Only registered users can see links on this board!
Get registered or login to the forums!


the pear library here:

Only registered users can see links on this board!
Get registered or login to the forums!


Install both...

And then...

For Example if I want to cache the list of reviews...

At the begining of the place you want to cache put:

Code:

require_once("includes/Cache_Lite/Lite.php");

$options = array(
  "cacheDir" => "/home/mydirname/tmp/Reviews_list",
  "lifeTime" => 900
);
$objCache = new Cache_Lite($options);

if ($rev_l = $objCache->get("Reviews_list")) {
echo "$rev_l";
}
else
{

ob_start();


Here goes the content you want to cache...
And at the end of the cached content put:

Code:

$rev_l = ob_get_contents();
$objCache->save($rev_l, "Reviews_list");
ob_end_flush();
}


I hope it helps... It helped a lot on my site... I cached news, and all the lists...


Last edited by Bigboy177 on Sun Oct 02, 2005 4:57 pm; edited 1 time in total
View user's profile Send private message
montego
Moderator


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

PostPosted: Sat Oct 01, 2005 6:53 am Reply with quote Back to top

BigBoy,

Consider placing "Cache Lite" somewhere in your topic title. This is good info and it would be good for others just looking at Topic title's to see Cache Lite specifically.

Thanks and regards,
montego
View user's profile Send private message Visit poster's website
Bigboy177
Worker
Worker


Joined: Jul 07, 2004
Posts: 192

PostPosted: Sun Oct 02, 2005 4:58 pm Reply with quote Back to top

montego wrote:
BigBoy,

Consider placing "Cache Lite" somewhere in your topic title. This is good info and it would be good for others just looking at Topic title's to see Cache Lite specifically.

Thanks and regards,
montego


I changed the topic... Wink
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum