Jump to content

[SOLVED] cache your includes


SirChick

Recommended Posts

Some one told me recently there is a "plugin" not sure if he meant function or some thing else... that allows you to cache your includes to reduce bandwidth .. is this true or has he just been misinformed?

 

If it is true what is it all about and is it worth looking into ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
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.