1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-10 09:02:50 +00:00

server - update user with character info

This commit is contained in:
2018-01-11 20:24:55 -06:00
parent 991e1bfe5a
commit dc7149eb8b
7 changed files with 91 additions and 62 deletions

View File

@@ -45,7 +45,7 @@ defmodule MyApp.BattleNet.User do
defp parse_character_response({:ok, %HTTPoison.Response{body: body}}, user_id) do
case Poison.decode(body) do
{:ok, data} ->
Cachex.set(:myapp, "usr_char:#{user_id}", data, ttl: :timer.minutes(1)) # 1 minute
Cachex.set(:myapp, "usr_char:#{user_id}", data, ttl: :timer.minutes(10)) # 10 minutes
{:ok, data}
{:error, error} -> {:error, error}
end