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.
12 <img src="support/doc/user/redundancy.png" alt="Redundancy" />
16 Videos are kept in the cache for at least `min_lifetime`, and then evicted when the cache is full.
18 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.
19 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.
23 See the `/api/v1/server/stats` endpoint. For example:
33 "strategy": "most-views",
34 "totalSize": 104857600
40 "strategy": "trending",
41 "totalSize": 104857600
47 "strategy": "recently-added",
48 "totalSize": 104857600