Merge pull request #1904 from poanetwork/ab-fix-env-var-type

fix `BLOCK_COUNT_CACHE_TTL` env var type
pull/1915/head
Ayrat Badykov 6 years ago committed by GitHub
commit f67262b35d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 3
      apps/explorer/config/config.exs
  3. 4
      apps/explorer/lib/explorer/chain/block_count_cache.ex

@ -25,6 +25,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
- [#1898](https://github.com/poanetwork/blockscout/pull/1898) - check if the constructor has arguments before verifying constructor arguments
### Chore

@ -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.

@ -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"

Loading…
Cancel
Save