Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

badges are not updating #19

Closed
golamSaroar opened this issue Aug 28, 2020 · 9 comments
Closed

badges are not updating #19

golamSaroar opened this issue Aug 28, 2020 · 9 comments

Comments

@golamSaroar
Copy link

Hi, the badges are not updating for some reason. I created repositories, made commits, etc but only the old count is shown. I cleared the cache and also tried in incognito mode, the same result.
Interestingly though, when I open the README file on vscode, and preview the file, I see the updated counts.
Can you help with this? Below is the code I used to add the badges on my README.md:

<a href="https://github.com/golamSaroar?tab=repositories"><img src="https://badges.pufler.dev/repos/golamsaroar"></a>
<a href="https://gist.github.com/golamSaroar"><img src="https://badges.pufler.dev/gists/golamsaroar"></a>
<img src="https://badges.pufler.dev/commits/monthly/golamsaroar">
<a href="https://github.com/golamSaroar/golamsaroar"><img src="https://badges.pufler.dev/updated/golamsaroar/golamsaroar"></a>

Thanks.

@pujux
Copy link
Owner

pujux commented Aug 28, 2020

this may be because of the cache policy, I will play around with that a bit and try to make it work better!! thanks for telling me

@pujux
Copy link
Owner

pujux commented Aug 31, 2020

removed cache policy for the badges that don't need it (every one but the visits badge) so this should be fixed

@pujux pujux closed this as completed Aug 31, 2020
@golamSaroar
Copy link
Author

Could you regenerate the bug? And did you test the fix? Because it didn't work. I just created a gist, still, the old count is shown.

@pujux
Copy link
Owner

pujux commented Aug 31, 2020

Could you regenerate the bug? And did you test the fix? Because it didn't work. I just created a gist, still, the old count is shown.

I could reproduce it with the commits badge, and tested it afterwards. it might be that githubs internal cache policy for images fucks us over here, any ideas?

@pujux pujux reopened this Aug 31, 2020
@golamSaroar
Copy link
Author

I could reproduce it with the commits badge, and tested it afterwards. it might be that githubs internal cache policy for images fucks us over here, any ideas?

@puf17640 I think it's probably not a cache related issue on GitHub's end. If you look at my README, you'll see I have a "followers" badge, that one is using shields.io and being updated.

@pujux
Copy link
Owner

pujux commented Sep 6, 2020

I have now changed the code so that you are actually redirected to shields.io instead of me proxying the shields.io request, this was quite a performance increase and should also have fixed the problem displayed here, since i now have nothing to do with the caching, its all github or shields.io

@pujux pujux closed this as completed Sep 6, 2020
@minji-o-j
Copy link

@puf17640
Hello I think this problem is still not fixed yet because...

<img src="https://badges.pufler.dev/commits/monthly/minji-o-j?style=flat-square&color=black&logo=github"> 
<img src="https://badges.pufler.dev/commits/monthly/minji-o-j?style=flat-square&color=000000&logo=github"> 
<img src="https://badges.pufler.dev/commits/monthly/minji-o-j?style=flat-square&color=000000 &logo=github"> 
<img src="https://badges.pufler.dev/commits/monthly/minji-o-j?style=flat-square&color=000000  &logo=github"> 
<img src="https://badges.pufler.dev/commits/monthly/minji-o-j?style=flat-square&color=000000&logo=github ">


In my computer, the counter seem like
image

And if I want to update the count of "commits this month", I had to change the link..

But when I visit this link: https://badges.pufler.dev/commits/monthly/minji-o-j?style=flat-square&color=black&logo=github
image

it works well!!

I think it isn't update automatically in markdown file, not only this but Repos badge..

@pujux
Copy link
Owner

pujux commented Sep 27, 2020

yeah it seems that github is the problem here

... since i now have nothing to do with the caching, its all github or shields.io

@nitianabhigyan
Copy link

nitianabhigyan commented Apr 28, 2022

Hi, this maybe useful.
SO after reading through : https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls#removing-an-image-from-camos-cache
There is an option to PURGE the images from GitHub cache and FORCE reload. i.e.
curl -X PURGE https://camo.githubusercontent.com/4d04abe0044d94fefcf9af2133223....

For anyone facing this, please give it a shot.
You can find out the url to purge by right clicking on the image -> open in a new tab -> copy the url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants