Jump to content

[SOLVED] cache your includes


SirChick

Recommended Posts

I think they he might be talking about include_once() or require_once(). It works like include() and require() expect that the file is only included once even if you called it in multiple places.

 

 

How do you apply that withing your scripts exactly?

 

Simply use require_once or include_once instead of require/include. This has nothing to do with caching though.

Using include/require_once() also only have any meaning if you happen to have files that are included more than once.

 

There is a php cache that holds the parsed version of files, which speed up page execution because the parse phase is eliminated - http://php.net/apc

 

What is your question really about? Includes, bandwidth, speeding up page loading?

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.