rr- / malgraph4

MALgraph: statistics service for MyAnimeList.net users.
http://mal.oko.im
Other
158 stars 39 forks source link

Cache lifetime is not respected #113

Closed rr- closed 11 years ago

rr- commented 11 years ago
  1. User last data was updated 17 hours ago
  2. On user's profile, the text says it was updated 3 days ago
  3. Delete cache does nothing
  4. Turned cache off
  5. Refreshed the page
  6. Text now says user was updated 17h ago, which is correct
  7. Turned cache on

Possible explanation:

  1. User visited 4 days ago.
  2. User was enqueued
  3. Cache got rendered (saying update was 4d ago).
  4. User was processed (3d ago).
  5. User visited 18h ago.
  6. User was enqueued.
  7. Cache got rendered (saying update was 3d ago, since that was the last time user was processed).
  8. User was processed ( 17h ago).
  9. User visited 0h ago.
  10. Cache was loaded because it was <24h old, saying update was 3d ago, not 17h ago.

Solution: implement user-wise cache removal that would be triggered in cron-queue.php.