Set ttl_interval to the seconds_valid time
authorvaartis <vaartis@cock.li>
Thu, 27 Dec 2018 07:42:03 +0000 (07:42 +0000)
committervaartis <vaartis@cock.li>
Thu, 27 Dec 2018 07:42:03 +0000 (07:42 +0000)
lib/pleroma/application.ex

index bdd0ee26f2f22005b430f367359ae42a99a40d82..8dbacf2582b54632a55eac81a9adb6bc5e277870 100644 (file)
@@ -30,7 +30,7 @@ defmodule Pleroma.Application do
           [
             :used_captcha_cache,
             [
-              ttl_interval: :timer.seconds(60 * 2)
+              ttl_interval: :timer.seconds(Pleroma.Config.get!([Pleroma.Captcha, :seconds_valid]))
             ]
           ],
           id: :cachex_used_captcha_cache