TTL Indexes allow us to automatically delete documents from a collection when they expire. MongoDB has a background job that will perform the cleanup. In this video we show how they can be used a few points that need to be considered.
Doc page:
https://www.mongodb.com/docs/manual/c...
Chapters:
00:00 Introduction
01:16 Basic usage
05:39 Custom expiration per document