Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-829

Cache feed events in the user feed API endpoint

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None

      Right now, we hit the db for every request to the /1/user/<user_name>/feed/events API endpoint.

       

      We need to look into caching these events if possible. Possible things we can cache.

      • List of users a person follows, would need invalidation every time a person follows a new person or unfollows someone.
      • Follow events. Not completely sure how easy this will be, because we want all follow events for a list of users. We could possibly cache follow events for every user individually and group that in the endpoint.
      • Listens. We're getting last 2 listens per user. We could cache this in redis to reduce timescale calls

            riksucks riksucks
            iliekcomputers Param Singh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Version Package