microscaling / imagelayers-graph

A visualization tool to inspect and optimize Docker images used in your projects.
Apache License 2.0
165 stars 35 forks source link

Badge is not updated after updating the Docker image #77

Closed FooBarWidget closed 9 years ago

FooBarWidget commented 9 years ago

I just pushed out a new release of phusion/baseimage. The 'latest' tag has been updated. However, https://badge.imagelayers.io/phusion/baseimage:latest.svg is still showing the old size (280 MB) instead of the new size (238 MB).

bdehamer commented 9 years ago

@FooBarWidget Depending on the number of layers in the image it can be very expensive to collect the size information for an image (we have to make a number of API calls against the Docker Hub to collect all the necessary info). In order to avoid slamming the Docker Hub constantly, we are caching badges that are generated for six hours before we regenerate them.

Please check your badge again after the six hour cache expiration and see if it has updated properly.

FooBarWidget commented 9 years ago

Ok, sounds reasonable.

bdehamer commented 9 years ago

@FooBarWidget looks like your badge has been updated. Gonna close this issue. Thanks.

FooBarWidget commented 9 years ago

I have a suggestion. Even though the badge is cached for 6 hours, if I go to https://imagelayers.io/?images=phusion%2Fbaseimage:latest, the latest state of the image is shown. Looks like there is no caching going on there. Can't you make that endpoint check whether the badge is up-to-date, and if not, refresh it from there?

bdehamer commented 9 years ago

Good idea. I'll add that as an enhancement idea.