<script>
  import Spacer from '$lib/Layout/Spacer.svelte';
  import settings from '$stores/settings';
</script>

<small class="opaque">
  Clearing
  <a href="https://due.moe">due.moe</a>'s site data will clear these caches too.
</small>

<Spacer />

Re-cache AniList media lists every
<input
  type="number"
  class="no-shadow"
  bind:value={$settings.cacheMinutes}
  min="1"
  max="60"
  placeholder="30"
  size="1"
  onchange={() =>
    ($settings.cacheMinutes < 1 && ($settings.cacheMinutes = 1)) ||
    ($settings.cacheMinutes > 60 && ($settings.cacheMinutes = 60))}
/>
minutes

<br />

Re-cache manga data every
<input
  type="number"
  class="no-shadow"
  bind:value={$settings.cacheMangaMinutes}
  min="5"
  max="1440"
  placeholder="120"
  size="2"
  onchange={() =>
    ($settings.cacheMangaMinutes < 5 && ($settings.cacheMangaMinutes = 5)) ||
    ($settings.cacheMangaMinutes > 1440 && ($settings.cacheMangaMinutes = 1440))}
/>
minutes
