Skip to content

Method to purge cache #55

@louisgcom

Description

@louisgcom

Hello,

I noticed that vumbnail.com caches video thumbnails using Cloudflare and Vercel with the following cache policy:

'Cache-Control': public, max-age=${ ONE_MONTH }, s-maxage=${ ONE_YEAR }

This means that thumbnails are stored for one year on Cloudflare's cache, making it impossible to refresh them if a new video thumbnail is updated.

Problem

  • Adding query parameters (e.g., ?timestamp=12345) does not bypass the cache.
  • Sending Cache-Control: no-cache or Pragma: no-cache headers from the client has no effect.
  • Cloudflare ignores Range requests as well.

The only way to get a fresh thumbnail is to wait for the cache expiration or manually purge it (which is not possible for users).

Example:

Suggested Solutions

Would it be possible to implement a method to force a cache refresh? Here are some potential solutions:

  • Support cache-busting query parameters (e.g., https://vumbnail.com/919072679.jpg?v=timestamp) to serve fresh thumbnails when needed.
  • Reduce the Cloudflare/Vercel cache duration (s-maxage) to a more reasonable time (e.g., a few days).
  • Provide an endpoint to purge an image from the cache when necessary.
  • This would be very helpful for users who frequently update video thumbnails on Vimeo.

Thanks for your work on vumbnail! Looking forward to your feedback.

Best,
Louis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions