Cache and ETS

Understand the role of cache and ETS in distributed Elixir.

We'll cover the following

What is cache?

Moz fetched all of their data upfront using a database-less strategy. Another company called “Ministry of Games” kept mutable data in memory and persisted it to the database at specific moments and time intervals. Those are great examples of leveraging the power of Elixir to design optimal solutions.

We can also leverage the tooling provided by the VM machine on simpler problems, such as caching. A cache allows us to store the result of a computation and reuse it several times, perhaps by multiple entities. Caches are a classic example of ephemeral data. If we lose the cache, we can just rebuild it again.

Get hands-on with 1200+ tech skills courses.