PDA

View Full Version : AWS & JPCACHE Question



Emancipator
08-11-2004, 10:10 AM
Hello, new guy here, love AWS. I am using some of the code on my site, after hacking it up hardcore.

So my question is this Here is what I have at the top of my page


<?php require_once('Connections/vanEE.php'); ?>
<?php
require('amazon/PHPSample/aws-functions.php');//Include Root Functions
require_once('jpcache/jpcache.php');
?>

The AWS data works fantastic, and the cache is definitely caching something.. but can somebody explain HOW it works tosomebody who has never done this before.

So when a visitor hits my site it caches the page? What about google? And how does it TELL what to do when the visitor hits the page. Is there a way to just cache the AMAZON bit?

Thanks guys.. much appreciated.

MarkB
08-11-2004, 12:51 PM
JPCache caches the page/s to a file, as you know. It has a built in expiry variable (which you can alter) so it knows when to 'renew' a cached page. Google is seen as just another visitor, and isn't treated any differently.

As far as just caching the amazon bit, I don't see the point... it's the amazon stuff you want to cache (to cut down on load time), and since local files will load just as quickly as cached bits, seperating them doesn't make much sense to me...

Emancipator
08-11-2004, 01:08 PM
hi Mark.

My page is dynamic, and is updated by the staff every few minutes. So those updates only show when the cache updates. I was just curious to hear, and appreciate your response.

I set the cache timer to 20mins vs 2hours so it doesnt affect much news wise.

MarkB
08-11-2004, 01:38 PM
Hmm... that's a conundrum :) You could always use an include to pull the Amazon data from an AWS page (that is cached) into your otherwise 'normal' page, and therefore not worry about the news updates? Or, alternatively, have the news headlines included via javascript, so it wouldn't be cached.

This kind of thing gives me a headache! ;)

Emancipator
08-11-2004, 02:21 PM
indeed was just thinking an inclusion file might work, but then im not THAT damn picky :P

Thanks Mark, your tutorial was very easy to follow to hack the code into my hacked up AWS :P