fix System.get_env("BLOCK_COUNT_CACHE_TTL") type

pull/1904/head
Ayrat Badykov 6 years ago
parent 81956d27f2
commit be1623b07e
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 3
      apps/explorer/config/config.exs
  2. 4
      apps/explorer/lib/explorer/chain/block_count_cache.ex

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