From be1623b07eef672132e5e949e07ea4ee71348a43 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 7 May 2019 14:56:43 +0300 Subject: [PATCH 1/2] fix System.get_env("BLOCK_COUNT_CACHE_TTL") type --- apps/explorer/config/config.exs | 3 ++- apps/explorer/lib/explorer/chain/block_count_cache.ex | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index ace69884ea..f40e10371b 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -82,7 +82,8 @@ config :spandex_ecto, SpandexEcto.EctoLogger, tracer: Explorer.Tracer, otp_app: :explorer -config :explorer, Explorer.Chain.BlockCountCache, ttl: System.get_env("BLOCK_COUNT_CACHE_TTL") +config :explorer, Explorer.Chain.BlockCountCache, + ttl: System.get_env("BLOCK_COUNT_CACHE_TTL") && String.to_integer(System.get_env("BLOCK_COUNT_CACHE_TTL")) # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/apps/explorer/lib/explorer/chain/block_count_cache.ex b/apps/explorer/lib/explorer/chain/block_count_cache.ex index 7c900bfedd..84f016dd44 100644 --- a/apps/explorer/lib/explorer/chain/block_count_cache.ex +++ b/apps/explorer/lib/explorer/chain/block_count_cache.ex @@ -6,8 +6,8 @@ defmodule Explorer.Chain.BlockCountCache do alias Explorer.Chain @tab :block_count_cache - # 1 minutes - @cache_period 1_000 * 60 + # 10 minutes + @cache_period 1_000 * 60 * 10 @key "count" @opts_key "opts" From b72cdaecdfbab39aa20b9c570e9d9c47f81845eb Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 7 May 2019 14:59:08 +0300 Subject: [PATCH 2/2] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ef0fe2319..2bb5799000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - [#1885](https://github.com/poanetwork/blockscout/pull/1885) - highlight reserved words in decompiled code - [#1896](https://github.com/poanetwork/blockscout/pull/1896) - re-query tokens in top nav automplete - [#1881](https://github.com/poanetwork/blockscout/pull/1881) - fix: store solc versions locally for performance +- [#1904](https://github.com/poanetwork/blockscout/pull/1904) - fix `BLOCK_COUNT_CACHE_TTL` env var type ### Chore