commits
The only reasonable way to test the WS API I have found is to run real
client and do real connection. Unfortunately Phoenix do not provide any
solution to test custom transports for sockets.
It will periodiically refresh cache with new top stories and prune the
old stories.
We could use `Nebulex` or `Cachex` there, but we do not need features
these tools bring us (and with that - their complexities). Simple ETS
table is more than enough to fulfill our needs.
I much more prefer such naming scheme over "default" from Phoenix. It
gives more natural flow where similar ideas are grouped just like it is
happening in the "core" directory tree.
This provides us with simple approach to reading refresh duration in
human-readable way.
It uses `Req` as it is the simplest batteries-included HTTP client out
there. In theory we could use `httpc` there, but that API is severely
lacking in usablity and is known to be underperforming (unfortunately).
Hopefully in future OTP will gain new HTTP client that will replace need
for external libraries (just like happened with JSON).
It uses `Req` as it is the simplest batteries-included HTTP client out
there. In theory we could use `httpc` there, but that API is severely
lacking in usablity and is known to be underperforming (unfortunately).
Hopefully in future OTP will gain new HTTP client that will replace need
for external libraries (just like happened with JSON).