What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

I knew there was a bug in this since I got bit by it once before. If you miss a day, the next time you log in it will say you still have the consecutive days in the UI, but if you click the number you can see that you really don't.

See the image below, it says 14 consecutive, but I've missed Sat and Sun (currently Sunday here, but not in UTC time).

enter image description here

Edit: This is really by design to display incorrect results? Here is another shot of the UI this morning when I logged in.

enter image description here

share|improve this question

2 Answers 2

I don't know how your caching works or what data you have access to in the UI when the user first logs in, but here is a possible solution for you that doesn't require more caching or extensive resources to ensure the numbers are correct.

(1) You have the last seen data as part of the user profile.

(2) You have the cached number of consecutive days (which may be incorrect).

If the last seen is not in the UTC yesterday, then the consecutive days should be 1. Otherwise use the cached value.

This shouldn't be too hard and will capture this edge case where the cache isn't updated yet and the user is a weirdo like me who looks at the calendar.

share|improve this answer

We heavily cache these numbers.

On your first visit of the day to a valid page, we'll queue you up to have the numbers incremented (as well as recording a history record of the visit).

In your case, you're going directly to your user page from the home page at the start of a day, so this will show out-of-date values until the database is updated.

We're not willing to invest resources at this time to ensure these cached numbers are always 100% accurate.

share|improve this answer
4  
So is this just confirming the bug? Not sure I understand your answer. –  Bryant Mar 20 '13 at 15:58
5  
If I'm understanding this correctly, the design is to show the wrong number when you look at it. Then if you're confused and check back later it will be correct which will cause even more confusion. –  Bryant Mar 23 '13 at 16:19
    
Why not update it when it's clicked on to show the calendar? That way you could leave the current caching alone, and only update it for the weirdos that want to see that calendar. The calendar looks current, so it seems you're already doing the work. –  ThinkingStiff Mar 25 '13 at 6:50
    
I'm sure you cache lots of stuff, but I don't see how this means it is ok to have a broken UI. See my feeble attempt at solving this for you below. If that doesn't work, then you could check to see if the user is looking at their own profile and fix that one case at least. –  Bryant Mar 25 '13 at 15:24
    
I experience a similar problem. My counts are often too low, and sometimes declining, e.g. from 5 to 2 within 3 hours, which is not explainable by caching, except if the cache algorithm is implemented in a bad way which allows that older values can be taken again later, after newer were already known. I consider this a bug and not a bad cache. –  Daniel S. Aug 29 '13 at 10:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .