Module cache

Module cache 

Source
Expand description

§Persistent cache storage

RustyPipe caches some information fetched from YouTube: specifically the client versions and the JavaScript code used to deobfuscate the stream URLs.

Without a persistent cache storage, this information would have to be re-fetched with every new instantiation of the client. This would make operation a lot slower, especially with CLI applications. For this reason, persisting the cache between program executions is recommended.

Since there are many diferent ways to store this data (Text file, SQL, Redis, etc), RustyPipe allows you to plug in your own cache storage by implementing the CacheStorage trait.

RustyPipe already comes with the FileStorage implementation which stores the cache as a JSON file.

Structs§

FileStorage
CacheStorage implementation that writes the cache to a JSON file at the given location.

Traits§

CacheStorage
Cache storage trait