Using ETS

ETS is an in-memory storage system that stores pretty simple sets of information. ETS is insanely fast; imagine if every web application you ever wrote had something like Redis attached to it by default, for free, without any additional infrastructure! It's a very cool, but also often underutilized, feature that is rooted even deeper than Elixir itself. It can be used to store any data structure that Elixir and Erlang themselves can store. ETS works on the principle that each process itself can own up to 1,400 tables of information. However, this also means that all of the information in those tables goes away when that process goes away!

Get Phoenix Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.