Thanks for the reply
So, the library’s config.exs is loaded only if the developers of host applications import it correctly. I imagined this was possible, but it doesn’t seem very reliable. Still, good to know!
Ok, thanks. Good to know ![]()
I’m not sure what do you mean with this.
At the moment the cache is an ETS table created with [:set, :protected, :named_table, {:read_concurrency, true}]. It’s wrapped in a supervised GenServer started with the application.
Writes to the cache are go through casts to the owner process, so that they’re serialized (they’re going to be infrequent or, at best, in short bursts).
Reads, on the other hand, are executed in the invoking process, to minimize the data transferred between processes. I’m vaguely aware that an ETS table is actually a process itself, but I’m trying to support high levels of read concurrency and I’ve read that this approach is better than reading through GenServer.call(table_owner_pid, {:please_read, :my_key}).
Is this what you’re referring to? Or are you suggesting another process that either proxies to the cache or goes directly to Redis? And then I would swap this process if needed?
Ok, that’s interesting. I can think how I would do it by setting MIX_ENV in the terminal. Can you give me an example of how you’d do this with alias please?






















