Jump to content

Caching a Page


ciber

Recommended Posts

I have created a site from scratch that generated all its content from a database, I want to cache these pages - but dont want to modify my code excessively.

I have tried to find something that can do this, but since I have never had the need to do it before, I dont know how or what to look for.

 

Is there any easy solutions to caching a page so that it can be accessed immediately without needing to access the database. Even if the cache folder needs to be manually emptied.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/206629-caching-a-page/
Share on other sites

create a cached folder. After the page is fetched, gzip it (optional) and store it in the cached folder with a unique name.

 

If a page with that unique name is in that folder on the next page load, just load that page instead of pulling from the database. If it is not there then continue generating from the database. Viola you have a cache system.

Link to comment
https://forums.phpfreaks.com/topic/206629-caching-a-page/#findComment-1080680
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.