chore(dolist): cache sender_id so we don't request it at each send
This commit is contained in:
parent
9641a40ea7
commit
6a3de1b57a
1 changed files with 3 additions and 1 deletions
|
@ -123,7 +123,9 @@ class Dolist::API
|
||||||
end
|
end
|
||||||
|
|
||||||
def sender_id
|
def sender_id
|
||||||
@sender_id ||= senders.dig("ItemList", 0, "Sender", "ID")
|
Rails.cache.fetch("dolist_api_sender_id", expires_in: 1.hour) do
|
||||||
|
senders.dig("ItemList", 0, "Sender", "ID")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get(url)
|
def get(url)
|
||||||
|
|
Loading…
Add table
Reference in a new issue