Page MenuHomeMusing Studio

Cache collection data
Open, NormalPublic

Description

Overview

Collection data fetched from the database should be cached for at least a few seconds, like users posts are.

Background

A sudden influx of visitors to a blog or blog post puts a pretty heavy load on the database. This isn't really a problem with a post that gets a few hits per second, but is regularly an issue when a post is quickly spread around the fediverse, where it's possible to see 50+ requests per second.

Implementation

Add a cache for collection data, ideally at a low level, like in the datastore.GetCollection() method. The cache map keys should either be collection IDs or Aliases -- whichever makes more sense for how collections are retrieved when fetching posts.

Event Timeline

matt created this object with visibility "Public (No Login Required)".
matt edited projects, added WriteFreely; removed WriteFreely (v1.0).