Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.