Cache like kv store implemenation made in Elixir.
First of all you need to start new GenServer. You can do it with
{:ok, pid} = PseudoCache.start_link()
It is possible to give already created map as an arugment to start_link() function (by defauly, GenServer starts with empty cache/map).
It provides four functions:
- put(pid, key, element) - puts k/v pair to cache.
- put(pid, key, element, expiration) - puts k/v pair to cache and removes after expiration time.
- delete(pid, key) - deletes k/v pair from cache.
- get(pid, key) - return element associated to given key.
make test