ciber Posted July 3, 2010 Share Posted July 3, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/206629-caching-a-page/ Share on other sites More sharing options...
premiso Posted July 3, 2010 Share Posted July 3, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/206629-caching-a-page/#findComment-1080680 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.