I have earned 111 Reputation with 10 Badges, When i try to take the code for Stackoverflow's Flair, I can see only 66 Reputation in the theme : default and the other theme has the correct values, May i know the Reason for it ?
-
4Caching. It's always caching.– Once Upon a DevCommented Feb 24, 2014 at 11:45
-
But i want to use the flair in my website. How can i do that to get default theme flair with exact reputation, which updates the reputation automatically ?– Sulthan AllaudeenCommented Feb 24, 2014 at 11:46
-
@SulthanAllaudeen When it's ready to be refreshed, it will be refreshed - it's not something you have control over– CliveCommented Feb 24, 2014 at 11:47
-
@Clive Does it have any time based or reputation based refresh ?– Sulthan AllaudeenCommented Feb 24, 2014 at 11:49
-
I'm not sure what triggers invalidation for a specific flair, but I imagine it's time based, yes. Couldn't tell you the interval though, I'm sure a dev will– CliveCommented Feb 24, 2014 at 11:50
Add a comment
|
1 Answer
Flair is cached for up to 3 days, per web server since we serve these images externally. We may route them via the CDN later at which point we can lower the cache times...but that's not planned yet.
Until then you may see differences in your flairs between those that are already used/cached vs. those you're hitting for the first time (likely hitting that page). This is expected and will resolve itself as cache expires.
-
Thanks for the answer. But make Cache Refresh of Flair with specific time because it may be important for certain users. Commented Feb 24, 2014 at 11:57
-
@SulthanAllaudeen we generate flair for millions of users, lowering the time isn't that simple. It must first be routed via the CDN so we can generate it on the fly - that's not a quick change, but is something I've wanted to do for a while...just need time.– Nick Craver ModCommented Feb 24, 2014 at 12:02