我正在尝试在我的phoenix / elixir Web应用程序中将cachex用作缓存层。当我打开交互式控制台iex时,键入Cachex.get(:my_cache, "key")
它显示
(UndefinedFunctionError) function Cachex.get/2 is undefined (module Cachex is not available)
我遵循了此处显示的所有步骤https://github.com/whitfin/cachex
听起来像您在打开控制台时未运行该应用程序(cachex文档仅显示iex
)。您实际上应该使用iex -S mix
启动控制台以获取您的应用程序代码。