Merge pull request #6940 from blockscout/vb-fix-ttl_check_interval

Reduce ttl_check_interval for cache modules
pull/6941/head
Victor Baranov 2 years ago committed by GitHub
commit 4514b0b0d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 2
      apps/explorer/lib/explorer/chain/cache/block.ex
  3. 2
      apps/explorer/lib/explorer/chain/cache/gas_price_oracle.ex
  4. 2
      apps/explorer/lib/explorer/chain/cache/gas_usage.ex
  5. 2
      apps/explorer/lib/explorer/chain/cache/transaction.ex

@ -9,6 +9,7 @@
### Fixes ### Fixes
- [#6940](https://github.com/blockscout/blockscout/pull/6940) - Reduce ttl_check_interval for cache module
- [#6912](https://github.com/blockscout/blockscout/pull/6912) - Docker compose fix exposed ports - [#6912](https://github.com/blockscout/blockscout/pull/6912) - Docker compose fix exposed ports
- [#6913](https://github.com/blockscout/blockscout/pull/6913) - Fix an error occurred when decoding base64 encoded json - [#6913](https://github.com/blockscout/blockscout/pull/6913) - Fix an error occurred when decoding base64 encoded json
- [#6911](https://github.com/blockscout/blockscout/pull/6911) - Fix bugs in verification API v2 - [#6911](https://github.com/blockscout/blockscout/pull/6911) - Fix bugs in verification API v2

@ -13,7 +13,7 @@ defmodule Explorer.Chain.Cache.Block do
key: :count, key: :count,
key: :async_task, key: :async_task,
global_ttl: Application.get_env(:explorer, __MODULE__)[:global_ttl], global_ttl: Application.get_env(:explorer, __MODULE__)[:global_ttl],
ttl_check_interval: :timer.minutes(15), ttl_check_interval: :timer.seconds(1),
callback: &async_task_on_deletion(&1) callback: &async_task_on_deletion(&1)
require Logger require Logger

@ -42,7 +42,7 @@ defmodule Explorer.Chain.Cache.GasPriceOracle do
key: :gas_prices, key: :gas_prices,
key: :async_task, key: :async_task,
global_ttl: Application.get_env(:explorer, __MODULE__)[:global_ttl], global_ttl: Application.get_env(:explorer, __MODULE__)[:global_ttl],
ttl_check_interval: :timer.minutes(5), ttl_check_interval: :timer.seconds(1),
callback: &async_task_on_deletion(&1) callback: &async_task_on_deletion(&1)
def get_average_gas_price(num_of_blocks, safelow_percentile, average_percentile, fast_percentile) do def get_average_gas_price(num_of_blocks, safelow_percentile, average_percentile, fast_percentile) do

@ -19,7 +19,7 @@ defmodule Explorer.Chain.Cache.GasUsage do
key: :sum, key: :sum,
key: :async_task, key: :async_task,
global_ttl: cache_period(), global_ttl: cache_period(),
ttl_check_interval: :timer.minutes(15), ttl_check_interval: :timer.seconds(1),
callback: &async_task_on_deletion(&1) callback: &async_task_on_deletion(&1)
alias Explorer.Chain.Transaction alias Explorer.Chain.Transaction

@ -8,7 +8,7 @@ defmodule Explorer.Chain.Cache.Transaction do
key: :count, key: :count,
key: :async_task, key: :async_task,
global_ttl: Application.get_env(:explorer, __MODULE__)[:global_ttl], global_ttl: Application.get_env(:explorer, __MODULE__)[:global_ttl],
ttl_check_interval: :timer.minutes(15), ttl_check_interval: :timer.seconds(1),
callback: &async_task_on_deletion(&1) callback: &async_task_on_deletion(&1)
require Logger require Logger

Loading…
Cancel
Save