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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:40:32+00:00 2026-05-25T17:40:32+00:00

I am using timThumb that has a cache engine. As the script/tutorials say, you

  • 0

I am using timThumb that has a cache engine. As the script/tutorials say, you have to have a cache file with permission 0777. This is what I have already.

When an image is viewed in the page, using the below

timthumb.php?src=http://farm3.static.flickr.com/2340/2089504883_863fb11b0a_z.jpg

it creates a 9c9313eced007f38eb59791dad91edb1.jpg file in the cache folder.

I checked the image and it is the same I saw. On my next refresh, I view the page source and I get again

timthumb.php?src=http://farm3.static.flickr.com/2340/2089504883_863fb11b0a_z.jpg instead of the cached image.

My question is, shouldn’t show a domain.com/9c9313eced007f38eb59791dad91edb1.jpg ?

This is the code I use http://codepad.org/pVzET9Dv ( It is a modified version to accept all domains )

Note: I tried it also with the official release, but again the same. Maybe it’s how cache works, I don’t know.. But if is so, how can I check that what I saw is the cached?

  • 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-25T17:40:33+00:00Added an answer on May 25, 2026 at 5:40 pm

    You have the wrong idea about the concept of caching here.

    Notice that when a file is in the cache_dir, php checks whether the user has sent him the header HTTP_IF_MODIFIED_SINCE.

    If the browser sends this header, then this means that the browser has a local copy of this file which has had a Last-Modified value of HTTP_IF_MODIFIED_SINCE when it was downloaded.

    Now, if this date is the really the last modification date of the image, the server sends the header HTTP/1.1 304 Not Modified.

    Notice the check in function show_cache_file.


    One more thing, it seems php is re-sizing the image and saving the re-sized image in its own cache folder. So in this way, the re-sizing process is not repeated again.


    I am not aware whether there is a browser that allows you to know if a displayed image is fetched from cache or downloaded. Anyway this is irrelevant since the user must be sure that it is the most recent image.

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

Sidebar

Related Questions

Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I am using TimThumb at http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/ . I have adjusted the memory_limit to 5000MB
using CodeIgniter normally one has to specify the controllers in the config/routes.php file. This
Using C#, I need a class called User that has a username, password, active
Using Core Data. Let's say we have models for Team and Player. Assume: -Each
I have this code: http://jsfiddle.net/J6vzU/1/ I want to dynamically display thumbnail of uploaded file
Using CRM 4, I have an entity form that contains a tab with an
using ASP.NET MVC, I have a Model, to which I'm attaching attributes so that
I am using the TimThumb script ( http://code.google.com/p/timthumb/ ). My images links are generated
Using Android 2.1+. I have a service that gets killed from time to time

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.