Why use ETS?

This, of course, begs the question of why we should use it if it can go away that quickly. The first reason is that it's fast! It's also very simple to implement and requires no additional infrastructure, which means if you need to cache temporary information, it's actually very simple to do so. Since this information is so incredibly temporary, however, we need to make sure that we don't store any information in it that is actually necessary to the function of our application, or at the very least information that is not also available somewhere in a more permanent form of storage. 

That is honestly where ETS shines: using it for temporary caches of information that you have elsewhere, but maybe more expensive to fetch from. ...

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.