Elixir in Action - ch07 - implementing a cache help

I just downloaded the files and compiled them with Elixir 1.11.3.

iex(1)> c("server.ex")
warning: ...
[Todo.Server]
iex(2)> c("cache.ex")
[Todo.Cache]
iex(3)> c("list.ex")
warning: ...
[Todo.List]
iex(4)> {:ok, cache} = Todo.Cache.start
{:ok, #PID<0.129.0>}
iex(5)> Todo.Cache.server_process(cache, "Bob's List")
#PID<0.132.0>
iex(6)> Todo.Cache.server_process(cache, "Alice's Lists")
#PID<0.134.0>

No errors. So there must be some differences, either between your code and the repo code, or in the commands you’re running. Glancing at the code, that string in the second parameter is only used as a map key. You should be able to pass any string as the name.

1 Like