Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8588731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:52:33+00:00 2026-06-11T22:52:33+00:00

Does enabling cache affect dynamic content? For example, on one of my PHP sites,

  • 0

Does enabling cache affect dynamic content?

For example, on one of my PHP sites, the cache header is set to:

Cache-Control: public, max-age=21600

Does that affect dynamic content as well?

If so, then what is the standard way to cache a dynamic PHP site? Presumably, you would cache static content (e.g. images), but not dynamic content (e.g. html, text, etc). How and where would you accomplish that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:52:34+00:00Added an answer on June 11, 2026 at 10:52 pm

    Yes. The answer is yes. This controls browser and some ISP caching. It will cache dynamic content for the time you specify in many locations. Not all. Not all browsers will follow the rules, not all ISPs will follow the rules. Famously, AOL used to disregard people’s cache rules and cache everything for strange times leading to broken pages on the early web.

    On a dynamic page that isn’t cached, you can use this value to set pages that change relatively in-frequently to cache for 10 minutes to an hour. For images, css, js files and things for longer. Caching for 8 hours is probably too much, as it is much longer than 1 hour, but only reduces the total number of hits for the content by 7.

    Other Caching

    There are other, probably more reliable, ways to cache content. You can look into query caching, file caching, memcached. All of these options can also be used to cache things other than content as well. They will all help you speed up repetitive actions.

    Query Caching

    Many databases, MySQL being the defacto standard, offer query caching. This will cache the results of queries on tables that haven’t been updated since the last time the query was run. Perfect for normalized look-up tables. Ideal for tables that are updated only once in a blue moon. Works well for tables that are updated about once and hour to even every 10 minutes. For tables that change more often than that, they will produce limited time-saving results.

    File Caching and Memcached

    These can be used to cache key/value pairs of information. They can be page_url/page_content or page_list/array_of_pages_in_site or any other key/value pairs you need. This is how most people go about caching pages for 10-60 minutes these days. They are reliable, controlled on the server, and can be flushed instantly if needed. They don’t need to be time based, if your logic is written correctly you can treat these like the query cache. Only when information is updated do you flush that key from the cache, and then the page updates instantly and otherwise sits in cache.

    Header Cache

    Which brings us back to header cache. It is still smart to cache here for about 10 minutes even with the other caches in place. The other caches still require requests of the server, which can slow it down. While this won’t reduce that pressure by much, it will reduce it. And it doesn’t take much effort to install.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does enabling static and dynamic content compression in IIS 7.5 work for compressing .NET
Does enabling the configuration option with-config-file-scan-dir when compiling PHP lead to performance issues? Specifically,
I've been working on enabling JSON compression from one of our MVC3 sites. From
I am looking at enabling FastCGI to handle PHP execution on all of my
I just started thinking about using the NHibernate second level cache in one of
I have a dynamic php (Yii framework based) site. User has to login to
Does anyone know how, on Ubuntu 8.04, with PHP 5 and MySQL 5.0, to
Does anyone know how it is done? They seem to be enabling japanese language
One of the things that the Microsoft documentation says about enabling reliable sessions is
I have found the following page on the matter: http://typo3.org/development/articles/using-cache-control-headers-in-typo3/page/3/ But enabling config.sendCacheHeaders does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.