Page MenuHomewrite.as

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 task.Nov 20 2018, 3:45 AM
matt created this object with visibility "Public (No Login Required)".
matt moved this task from v1.0 to Soon on the Write Freely board.Mon, Feb 4, 10:14 PM
matt edited projects, added Write Freely; removed Write Freely (v1.0).