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 997219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:59:53+00:00 2026-05-16T06:59:53+00:00

So I have a PHP CodeIgniter webapp and am trying to decide whether to

  • 0

So I have a PHP CodeIgniter webapp and am trying to decide whether to incorporate caching.

Please bear with me on this one, since I’ll happily admit I don’t fully understand caching!

  • So the first user loads up a page of user submitted-content. It takes 0.8 seconds (processing) to load it ‘slow’. The next user then loads up that same page, it takes 0.1 seconds to load it ‘fast’ from cache.

  • The third user loads it up, also taking 0.1 seconds execution time. This user decides to comment on the page.

  • The fourth user loads it up 2 minutes later but doesn’t see the third user’s comment, because there’s still another 50 minutes left before the cache expires

What do you do in this situation? Is it worth incorporating caching on pages like this?

The reason I’d like to use caching is because I ran some tests. Without caching, my page took an average of 0.7864 seconds execution time. With caching, it took an average of 0.0138 seconds. That’s an improvement of 5599%!

I understand it’s still only a matter of milliseconds, but even so…

Jack

  • 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-05-16T06:59:53+00:00Added an answer on May 16, 2026 at 6:59 am

    You want a better cache.

    Typically, you should never reach your cache’s timeout. Instead, some user-driven action will invalidate the cache.

    So if you have a scenario like this:

    1. Joe loads the page for the first time (ever). There is no cache, so it takes a while, but the result is cached along the way.
    2. Mary loads the page, and it loads quickly, from the cache.
    3. Mary adds a comment. The comment is added to the database (or whatever), and the software invalidates the cache
    4. Pete comes along and loads the page, the cache is invalid, so it takes a second to render the page, and the result is cached (as a valid cache entry)
    5. Sam comes along, page loads fast
    6. Jenny comes along, page loads fast.

    I’m not a CodeIgniter guy, so I’m not sure what that framework will do for you, but the above is generally what should happen. Your application should have enough smarts built-in to invalidate cache entries when data gets written that requires cache invalidation.

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

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First of all, it's a really bad idea to use… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer If you are not dead set on using a listbox,… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer killproc will terminate programs in the process list which match… May 16, 2026 at 9:17 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

On my Unix web server, I have two MySQL database servers running. One on
I'm developing a system with codeigniter, php and jquery these days, still in the
I have a problem with CodeIgniter .htaccess file and hope that somebody can help
How to pass a php json encoded variable to a jquery function using codeigniter?
I have PHP function file with ~2,000 rows and I always include it for
I have a php script im currently using that creates thumbnails based on a
THIS PROBLEM IS NOW SOLVED. THANK YOU TO EVERYONE WHO REPLIED. Hello, I am
Soon I will have to start a web project for a company, and I
I found this thread on StackOverflow about how to get the Application Root from
I've been a PHP developer for many years now, with many tools under my

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.