Calendar/Moments: Cover cache should be cleared when marking photos as private #651

Closed
opened 2026-02-19 23:13:04 -05:00 by deekerman · 7 comments
Owner

Originally created by @ryancc9 on GitHub (Jan 3, 2021).

Originally assigned to: @lastzero on GitHub.

I ran into an issue with the Calendar recently and it seems to also apply to Moments, and maybe more. I recently started a new installation and library. While reviewing the calendar I noticed a thumbnail that I didn't want to be a public photo. I marked the thumbnail private but it was still the thumbnail. Below are my detailed steps for reproducing.

Using google chrome on windows 10 desktop PC:

  1. Viewing Calendar, notice a thumbnail photo that is not desired.
  2. View the particular Month and Year.
  3. Mark the photo that was seen in thumbnail as private.
  4. go back to Calendar view, photo that is now private is still being used as the thumbnail
  5. Switch to Microsoft Edge (never used before for Photoprisim)
  6. View calendar, private photo still showing up as thumbnail
  7. 1 day later, try again with edge and chrome, still showing private photo as thumbnail
  8. Clear all chrome cache, private photo still showing as thumbnail

There is some dependency on cache, ip, device, or ???. Because then I tried Firefox on Android (never used before for Photoprisim) new thumbnail displayed (not private photo)!

I then tried to reproduce on all 3 browsers with marking a photo private, then clearing cache, and couldn't get a new thumbnail to generate (still shows private thumbnail).

Version: PhotoPrism 201231-8e22fbf8-Linux-x86_64 on Docker-compose, Ubuntu Server 18.04
Browsers: Google Chrome, Microsoft Edge on Windows 10 x64. Firefox on Android 11

Let me know what additional info I can provide to help, thanks!

Thanks for creating such a great photo solution! I recently started using it for all my old photos and I'm optimistic I can use it to replace google photos for my new photos in the coming few months.

Originally created by @ryancc9 on GitHub (Jan 3, 2021). Originally assigned to: @lastzero on GitHub. I ran into an issue with the Calendar recently and it seems to also apply to Moments, and maybe more. I recently started a new installation and library. While reviewing the calendar I noticed a thumbnail that I didn't want to be a public photo. I marked the thumbnail private but it was still the thumbnail. Below are my detailed steps for reproducing. Using google chrome on windows 10 desktop PC: 1. Viewing Calendar, notice a thumbnail photo that is not desired. 2. View the particular Month and Year. 3. Mark the photo that was seen in thumbnail as private. 4. go back to Calendar view, photo that is now private is still being used as the thumbnail 5. Switch to Microsoft Edge (never used before for Photoprisim) 6. View calendar, private photo still showing up as thumbnail 7. 1 day later, try again with edge and chrome, still showing private photo as thumbnail 8. Clear all chrome cache, private photo still showing as thumbnail There is some dependency on cache, ip, device, or ???. Because then I tried Firefox on Android (never used before for Photoprisim) new thumbnail displayed (not private photo)! I then tried to reproduce on all 3 browsers with marking a photo private, then clearing cache, and couldn't get a new thumbnail to generate (still shows private thumbnail). Version: PhotoPrism 201231-8e22fbf8-Linux-x86_64 on Docker-compose, Ubuntu Server 18.04 Browsers: Google Chrome, Microsoft Edge on Windows 10 x64. Firefox on Android 11 Let me know what additional info I can provide to help, thanks! Thanks for creating such a great photo solution! I recently started using it for all my old photos and I'm optimistic I can use it to replace google photos for my new photos in the coming few months.
deekerman 2026-02-19 23:13:04 -05:00
Author
Owner

@graciousgrey commented on GitHub (Jan 4, 2021):

The update of the moment/calendar thumbnail is dependent on the server cache, which expires around every hour.
So after an hour there should be a new thumbnail independent from the browser you are using.

We do not check all moment/calendar thumbnails when photos are marked as private because this would impair performance.

@graciousgrey commented on GitHub (Jan 4, 2021): The update of the moment/calendar thumbnail is dependent on the server cache, which expires around every hour. So after an hour there should be a new thumbnail independent from the browser you are using. We do not check all moment/calendar thumbnails when photos are marked as private because this would impair performance.
Author
Owner

@lastzero commented on GitHub (Jan 4, 2021):

We can make our code even more complex, and put the photo on a blacklist that forces the API to refresh the cache on the next request - however:

  • The thumb would still be in the browser cache, so you have to wait
  • You may as well restart PhotoPrism in case of an emergency
  • We can as well offer an option to disable caching in favor of all changes having immediate effect
@lastzero commented on GitHub (Jan 4, 2021): We can make our code even more complex, and put the photo on a blacklist that forces the API to refresh the cache on the next request - however: - The thumb would still be in the browser cache, so you have to wait - You may as well restart PhotoPrism in case of an emergency - We can as well offer an option to disable caching in favor of all changes having immediate effect
Author
Owner

@ryancc9 commented on GitHub (Jan 4, 2021):

Thanks for the details about how it works. After restarting PhotoPrism and clearing browser cache it gave me the expected results and hid the private photo/thumbnail immediately.

When I ran into this problem the first time I was searching the documentation and settings for a re-index, clear thumbnails, clear cache type of button an couldn't find any. Would it be possible to add a clear server cache button in settings(maybe with a note you may also need to clear browser cache)? I could be an edge case, but restarting a program on a linux server isn't intuitive to me. I regularly have 300+ day uptimes and don't relaunch anything. Or maybe there is somewhere in the documentation info about server cache could be added?

I'm OK if you want to close this since I understand now, I'm just trying to make it easier for future people too.

@ryancc9 commented on GitHub (Jan 4, 2021): Thanks for the details about how it works. After restarting PhotoPrism and clearing browser cache it gave me the expected results and hid the private photo/thumbnail immediately. When I ran into this problem the first time I was searching the documentation and settings for a re-index, clear thumbnails, clear cache type of button an couldn't find any. Would it be possible to add a clear server cache button in settings(maybe with a note you may also need to clear browser cache)? I could be an edge case, but restarting a program on a linux server isn't intuitive to me. I regularly have 300+ day uptimes and don't relaunch anything. Or maybe there is somewhere in the documentation info about server cache could be added? I'm OK if you want to close this since I understand now, I'm just trying to make it easier for future people too.
Author
Owner

@lastzero commented on GitHub (Jan 5, 2021):

Might add a clear cache button, good idea. Or we always clear the cache when photos get marked as private. Need to think about the impact.

@lastzero commented on GitHub (Jan 5, 2021): Might add a clear cache button, good idea. Or we always clear the cache when photos get marked as private. Need to think about the impact.
Author
Owner

@lastzero commented on GitHub (Jan 5, 2021):

Flickr seems to change a part of the preview URL when photos are marked as private, but then the album preview would be broken. However, the old thumb URLs continue to be valid on Flickr - not sure, what good it is then.

@lastzero commented on GitHub (Jan 5, 2021): Flickr seems to change a part of the preview URL when photos are marked as private, but then the album preview would be broken. However, the old thumb URLs continue to be valid on Flickr - not sure, what good it is then.
Author
Owner

@lastzero commented on GitHub (Jan 5, 2021):

See #817

@lastzero commented on GitHub (Jan 5, 2021): See #817
Author
Owner

@lastzero commented on GitHub (Jan 8, 2021):

Explicitly set the cache TTL for cover images to 1 hour, see 4f8af03b55

@lastzero commented on GitHub (Jan 8, 2021): Explicitly set the cache TTL for cover images to 1 hour, see 4f8af03b55e1b17d80a259c91b5668a5e13d00fe
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#651
No description provided.