Author Topic: photo caching problem  (Read 715 times)

0 Members and 1 Guest are viewing this topic.

mmagliaro

  • Crew
  • *
  • Posts: 4704
  • Gender: Male
    • Maxcow Online
photo caching problem
« on: January 14, 2018, 07:20:31 PM »
Just another data point.
I just uploaded a bunch of new photos to my 0-6-0 project thread, and the first time I viewed the thread, none of the photos appeared until I refreshed the page.  So that problem has apparently not gone away.

Also, for one photo, I updated the text in it because I noticed a typo.  If I view the photo via its link directly, at
http://www.maxcowonline.com/photohost/sps060/photo667_makeRerailFrogBrackets.jpg, the corrected version is there (the first word of the last paragraph is "Finally". 

But even after refreshing the page in the Railwire thread, the old version still appears, with the typo "Sinally"
The link to the Railwire version is:

https://www.therailwire.net/forum/proxy.php?request=http%3A%2F%2Fwww.maxcowonline.com%2Fphotohost%2Fsps060%2Fphoto667_makeRerailFrogBrackets.jpg&hash=bcb9b8ba11446c314b8eef31e0732645

tom mann

  • Administrator
  • Crew
  • *****
  • Posts: 10716
  • Representing The Railwire on The Railwire
    • http://www.chicagoswitching.com
Re: photo caching problem
« Reply #1 on: January 14, 2018, 07:49:21 PM »
Ugh. Thanks for the update. Did you fix the link here- I’m confused why it would still point to the wrong image.

mmagliaro

  • Crew
  • *
  • Posts: 4704
  • Gender: Male
    • Maxcow Online
Re: photo caching problem
« Reply #2 on: January 15, 2018, 11:14:05 AM »
Ugh. Thanks for the update. Did you fix the link here- I’m confused why it would still point to the wrong image.

The first link in my above post is a direct link to the actual photo file.  The second link is the one that got created and embedded in my 0-6-0 thread when I submitted the post.  Do I have to actually DELETE that link in the 0-6-0 post, and then re-insert it, so that a new cache link gets generated?   Aha... I bet I have to do that in order to get the forum link to create a new cached entry.

I'm back...
No, that didn't work.  Removing the photo reference in the thread, saving, and then putting it back in and saving, it still has a cached copy of the photo WITHOUT the correction in it, so it appears as "Sinally" instead of "Finally" in the 0-6-0 thread.
« Last Edit: January 15, 2018, 11:18:09 AM by mmagliaro »

tom mann

  • Administrator
  • Crew
  • *****
  • Posts: 10716
  • Representing The Railwire on The Railwire
    • http://www.chicagoswitching.com
Re: photo caching problem
« Reply #3 on: January 15, 2018, 01:15:58 PM »
Lol. It’s working exactly as it should! The misspelled name version is in the cache; it correctly treats the correct spelled version as a different file.

mmagliaro

  • Crew
  • *
  • Posts: 4704
  • Gender: Male
    • Maxcow Online
Re: photo caching problem
« Reply #4 on: January 15, 2018, 04:25:20 PM »
But then, how do I correct the one that is showing in the post?  I remove the link to it, and saved, and then put a link in again, and the old cached one is the only one that shows.  How do I get that one out of the cache and force it to refresh from the "real" file, which has now been corrected?

tom mann

  • Administrator
  • Crew
  • *****
  • Posts: 10716
  • Representing The Railwire on The Railwire
    • http://www.chicagoswitching.com
Re: photo caching problem
« Reply #5 on: January 15, 2018, 06:56:55 PM »
@mmagliaro Do you remember when you first loaded them here? Like when you added them to your post and hit 'preview' or something.  I need to know when they were first added to the cache.  The hash algorithm is one-way so I have know idea which item in the cache it is (yeah, I see this as a problem).

edit:  nevermind, I fixed it for you! I found it by filesize.
« Last Edit: January 15, 2018, 07:22:43 PM by tom mann »

mmagliaro

  • Crew
  • *
  • Posts: 4704
  • Gender: Male
    • Maxcow Online
Re: photo caching problem
« Reply #6 on: January 15, 2018, 11:53:10 PM »
Thank you, Tom.  Yes, it's fixed now.

In the future, if I have to replace a photo due to a correction, I'll just get rid of it and upload a new one with a different filename so that the cache won't be an issue.  (Of course, that will leave the old version of the photo sitting in your cache and wasting space, which isn't ideal either)

svedblen

  • Crew
  • *
  • Posts: 544
  • Gender: Male
    • Three Yards Yard - beware - it is H0 - No, now it's O
Re: photo caching problem
« Reply #7 on: January 26, 2018, 04:52:19 AM »
I don't know if this is the same problem but I revisited an old thread of mine today, in search of some well buried info, but none of the pictures show up. I have reloaded the pages in various ways but no pics. This is the thread https://www.therailwire.net/forum/index.php?topic=35954.0.

I opened the first post in edit mode, and the image links are still there. The picture shows if I directly use the url:s from those links. So there is no problem on the server where I host the pictures.
Lennart

tom mann

  • Administrator
  • Crew
  • *****
  • Posts: 10716
  • Representing The Railwire on The Railwire
    • http://www.chicagoswitching.com
Re: photo caching problem
« Reply #8 on: January 26, 2018, 12:44:11 PM »
I don't know if this is the same problem but I revisited an old thread of mine today, in search of some well buried info, but none of the pictures show up. I have reloaded the pages in various ways but no pics. This is the thread https://www.therailwire.net/forum/index.php?topic=35954.0.

I opened the first post in edit mode, and the image links are still there. The picture shows if I directly use the url:s from those links. So there is no problem on the server where I host the pictures.

The reason is those images are huge file size-wise so my cache ignores them.  I need to change my code to just use your images.  In the meantime, if you resize them caching will work. Mobile users to your website will thank you!

svedblen

  • Crew
  • *
  • Posts: 544
  • Gender: Male
    • Three Yards Yard - beware - it is H0 - No, now it's O
Re: photo caching problem
« Reply #9 on: January 26, 2018, 01:23:30 PM »
That makes sense. Those were the first pics I posted on TRW and I just uploaded and linked to them as they came from my DSLR. Later on, when I started to use my iPhone to take pictures, I adopted the habit of running them trough MS Paint to get the orientation right. In the same process I resize them. I have fixed the pictures in that tread, so you need not change your code. Unless you have no better use for your time  :trollface:  :D
« Last Edit: January 26, 2018, 01:48:47 PM by svedblen »
Lennart