dwyl/quotes

How to Cache Opened File in Elixir?

Opened this issue · 0 comments

At present we are doing a File.read!/1 each time we request a random quote:

File.read!("quotes.json") |> Jason.decode!()

This is obviously inefficient. We need to cache the JSON data once.