3 A PeerTube instance can cache other PeerTube videos to improve bandwidth of popular videos or small instances.
7 The instance administrator can choose between multiple redundancy strategies (cache trending videos or recently uploaded videos etc), set their maximum size and the minimum duplication lifetime.
8 Then, they choose the instances they want to cache in `Manage follows -> Following` admin table.
10 Videos are kept in the cache for at least `min_lifetime`, and then evicted when the cache is full.
12 When PeerTube chooses a video to duplicate, it imports all the resolution files (to avoid consistency issues) using their magnet URI and put them in the `storage.videos` directory.
13 Then it sends a `Create -> CacheFile` ActivityPub message to other federated instances. This new instance is injected as [WebSeed](https://github.com/Chocobozzz/PeerTube/blob/develop/FAQ.md#what-is-webseed) in the magnet URI by instances that received this ActivityPub message.
17 See the `/api/v1/server/stats` endpoint. For example:
27 "strategy": "most-views",
28 "totalSize": 104857600
34 "strategy": "trending",
35 "totalSize": 104857600
41 "strategy": "recently-added",
42 "totalSize": 104857600