sotojuan
What should I use to cache API fetching results?
I am writing a client and want to cache what users get so it saves a request the second time. What’s the simplest thing to use in this case?
Most Liked
sotojuan
My wording was confusing! I’m making an Elixir API client for the Pokemon API. As in, a library which you can easily make requests with. It uses HTTPoison under the hood. I want to save each query result somewhere so that if it’s asked again it doesn’t make a request.
pancake
If you want to cache entire http requests use Varnish/Squid. But for caching for eg. a single query result you have to play with cache on the backend side (memcached/redis etc) → GitHub - whitfin/cachex: A powerful caching library for Elixir with support for transactions, fallbacks and expirations · GitHub
@edit: Now I see that you are talking about a client, not a server. So If you can’t configure some proxy, use in memory-cache (eg. redis) or file-based solution.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










