From 3dacb0f94b7eea1136bad391f7e8f37130bad35c Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 6 Oct 2020 09:02:21 +0300 Subject: [PATCH] Update last_update_key when new data received --- .../lib/explorer/counters/address_transactions_counter.ex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/explorer/lib/explorer/counters/address_transactions_counter.ex b/apps/explorer/lib/explorer/counters/address_transactions_counter.ex index 0973c81532..8445c4a12a 100644 --- a/apps/explorer/lib/explorer/counters/address_transactions_counter.ex +++ b/apps/explorer/lib/explorer/counters/address_transactions_counter.ex @@ -73,10 +73,9 @@ defmodule Explorer.Counters.AddressTransactionsCounter do end defp update_cache(address) do - put_into_cache(@last_update_key, current_time()) - new_data = Chain.address_to_transaction_count(address) address_hash_string = get_address_hash_string(address) + put_into_cache(@last_update_key, current_time()) put_into_cache("hash_#{address_hash_string}", new_data) end