Hi there,
I'm trying to develop an application in PHP and the problem is it keeps causing massive server load because it has to reload everything from external sources. How would I make the site cache it for 3 hours, then reload? I have found examples using the time, but surely the time is different in each country?
Daniel
Caching
Moderator: General Moderators
Re: Caching
Depends on what data you are using, but you may want to look at using Smarty, which has this built in.
I've written something like this before, and when I get home from work, will post more on this (on a break right now).
I'll see if I can pull a sample for you.
-Greg
I've written something like this before, and when I get home from work, will post more on this (on a break right now).
I'll see if I can pull a sample for you.
-Greg
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Caching
Yes, but you only have to deal with the timezone the server is in. The server doesn't change time automatically depending on where the request is coming from.Monotoko wrote: I have found examples using the time, but surely the time is different in each country?
Re: Caching
But surely I'm caching on the local machine? Which means it will be their time, or is my logic screwed?
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California