You have an example of how to build a caching system with OTP in this book…
…if You don’t mind reading some Erlang code.
AFAIK they use one gen_server per key.