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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:03:22+00:00 2026-05-31T16:03:22+00:00

I find the article titled How Basecamp Next got to be so damn fast

  • 0

I find the article titled How Basecamp Next got to be so damn fast without using much client-side UI from 37 signals (here) but couldn’t understand how the cache invalidating works.

let say:

i have a post object in array form like this:

$post = array(
    'id' => 3232,
    'title' => 'Test Post'
)

I’am saving it in the cache with cache key named: post-3232. And i have a latest posts array like this:

$latest = array(
    array(
        'id' => 3232,
        'title' => 'Test Post'
    ),
    array(
        'id' => 3233,
        'title' => 'Test Post 1'
    ),
    array(
        'id' => 3234,
        'title' => 'Test Post 2'
    )
)

I’m saving this list in cache with the cache key: latest-posts-140320121947

How can my latest posts list knows if any of the posts are deleted, changed or a new post is inserted?
I can’t figure out it from the article. maybe i can find some help from StackOverflow.

  • 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-31T16:03:24+00:00Added an answer on May 31, 2026 at 4:03 pm

    How can my latest posts list knows if any of the posts are deleted, changed or a new post is inserted?

    In simple terms, they can’t – the issue with caching is that you are deliberately serving old data. Sometimes that’s okay, of course.

    But, you can invalidate some caches. So, if you rewrite a single post, you should invalidate the cache for it, so that the next time it is viewed it re-caches with the new data. Single items like this are easy.

    But if you have a cache that contains a large amount of data (say the cached versions of a paginated screen, like Latest Posts, one cache item per page) then it is often too awkward/slow to update a single table row within it. If so, then it might be better to serve this screen uncached. But if Latest Posts just contains the last 10 items, invalidate the whole cache for that and redraw it.

    You could have the cached copy of this page contain a cached item for each table row (i.e. several cached rows in a larger cached table); however, the smaller your cache area, the less benefit you get. But that would certainly make it easier to invalidate just one row on its own.

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

Sidebar

Related Questions

I want to get the title of an article from this page using regex
I want to insert code for Open Id. I am unable to find article
I found this in an article on Multithreaded Apartments, but can’t find a definition
I find from reading perldoc perlvar, about a thousand lines in is help for
Is there a way to find related articles of a given article in sphinx?
My routes has: resources :articles article_controller.rb has: def show() @article = Article.find(:first, :conditions =>
I'm having problem posting a share to LinkedIn from my Android application. I'm using
EDIT - I was able to fix this problem using code from 'Farray' with
I am often facing design patterns, and I find most articles explaining them a
Hey there. I've read all the related articles on here and can't find one

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.