The cache is a blessing, but sometimes it makes pull your hair.
I don't know how long it takes to update the cache, I'm still seeing zeros.
But on the testboard it's not running a cache:
Average visits to this page
Hourly 0.00 Daily 0.01 Weekly 0.05 Monthly 0.22 Yearly 2.63
Isn't that displaying it the wrong way? I expect hourly views to rise faster than yearly views?
Hmm, I'm putting it wrong. Those are totals/averages for a hour-year right? When I do a fresh install with all counters set to zero, I guess I would see the hourly counter to go up first. ... erm... is it because our site is over 11 years old already with all old average data being 0? I can see hourly visits stay at 0 then, there will be loads of 0 visit hours in 11 years.
Edit: I set it to yesterdays date, reset the counter to 0 and did a few page refreshes
Average visits to this page
Hourly 0.25 Daily 6.05 Weekly 42.33 Monthly 183.93 Yearly 2,207.15
It doesn't make much sense to me? Shed some light on this please?
It's going to be query intensive I guess (though you can probably go around that with a cron that updates it once an hour). There would be 5 fields: one for an hourly counter and that gets life update. A field for day, week, month, year. After each hour the cron adds the hour value to the day value and the hour is reset to 0. After 24 hours the data from day is copied to week and resets to 0. And so on. That makes it totals and not averages.
|