Bug with themes/styles
Describe the bug
Radical theme doesn't update stats
Expected behavior
Stats must change or update when you do a commit, PR, etc.
Screenshots / Live demo link
Stats with theme "radical":
Stats without a theme:
Stats with theme "neon":
Additional context
All screenshots have been taken at same moment
@Alexasto12 I've encountered the same issue with the statistics not updating correctly in the README file. After some investigation, I found that the problem was due to browser cache. Clearing the browser cache resolved the issue for me.
The issue isn't specific to the radical theme ,it affects all themes :
Caching is used with expiration time of 24 hours (CONSTANTS.CARD_CACHE_SECONDS in utils.js). When you request stats with a specific theme, the result is cached .
Further request with same parameters (including same theme) will receive cached version until expiration, even if there is activity.
Different themes create separate cache entries, which is why switching themes might show updated stats (if the new theme wasn't previously cached or its cache has expired).
Workarounds: add parameters. add cache_seconds Or Wait 24 hours for cache expire
The caching mechanism is built this way only
Hello @Alexasto12
The stats calculation does not depends from the selected theme in any way. As was stated in previous comments, you're experiencing such behavior because of cache. We are using 24 hours default cache timing on the public instance. In case you want your cards to be updated more often feel free to deploy own Vercel instance using your own GitHub API token. You will be able to set CACHE_SECONDS environment variable with any custom cache timing there.