ExfileMemory
An in-memory (ets) storage adapter for Exfile. Usually doesn't make much sense except for an ephemeral cache because it will be completely emptied if your app restarts. Also, not shared between nodes.
Installation
Add exfile_memory to your list of dependencies in
mix.exs:def deps do
[ {:exfile, "~> 0.1.0"}, {:exfile_memory, "~> 0.1.0"} ]end
Ensure exfile_memory is started before your application:
def application do
[ applications: [ :exfile, :exfile_memory ] ]end
Configure the backend in
config.exs(or environment equivalent)config :exfile, Exfile,
backends: %{ "cache" => [ExfileMemory.Backend, %{ directory: "/", max_size: nil, hasher: Exfile.Hasher.Random }] }