Jump to content

best way to store and cache default/common pages


palacios000
 Share

Recommended Posts

Hi, I have some doubts on how is the best way to get some "default" pages and cache them. For example the homepage or contactpage urls need to be present throughout the entire website.

Normally I prepend a file in the config.php, something like "_defautlpages.php" and it works fine, but my question is now: do these find() requests get cached somewhere in the templates (procache or normal cache) or they load in every page load? Probably not because there's no page with the "_defautlpages.php" template... Or maybe yes...

I know that this won't impact on page speed, as normally I have only half a dozen default pages to load, but it's just a matter of doing things as nice as possible. Thanks for clarifying this existential dilemma!

Link to comment
Share on other sites

On 3/9/2023 at 12:19 PM, palacios000 said:

do these find() requests get cached somewhere in the templates (procache or normal cache) or they load in every page load?

If ProCache is on, you will get a static file instead of reaching PHP, so any "dynamic find()" that maybe changes over time, or is randomized, won't be really visible as you'll be seeing the version that exists in the static cache and won't change, until its built again. 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...