# pihole-FTL + unbound with Cache DB Module Options (Redis)

**URL:** <https://discourse.pi-hole.net/t/pihole-ftl-unbound-with-cache-db-module-options-redis/24676>\
**Category:** Customizing Pi-hole\
**Created:** [October 17, 2019, 3:36pm UTC](https://discourse.pi-hole.net/t/pihole-ftl-unbound-with-cache-db-module-options-redis/24676 "2019-10-17T15:36:44Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![jpgpi250](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jpgpi250/32/286_2.png) [@jpgpi250](https://discourse.pi-hole.net/u/jpgpi250)\
**Post date:** [October 21, 2019, 9:23am UTC](https://discourse.pi-hole.net/t/pihole-ftl-unbound-with-cache-db-module-options-redis/24676/22 "2019-10-21T09:23:40Z")

</div>

Found a discussion [here](https://nlnetlabs.nl/pipermail/unbound-users/2019-January/011315.html) which might explain some things.

@GieltjE: On tweakers.net, you stated (translation) as soon as de Redis cache provides an expired record, a new query is performed. This appears to be correct, but the request is (see below) performed after the response is provided to the client, this to update the expired entry (see below - **prefetch=yes** ).

I, and probably others, added **prefetch=yes** to my unbound config, as the result of a [discussion](https://discourse.pi-hole.net/t/anyone-using-knot-resolver/19750/68) (@DL6ER - Everyone of the team agreed to remove the lines) , where it was decided to remove **cache-min-ttl** and **cache-max-ttl** from the [recommended unbound config](https://docs.pi-hole.net/guides/unbound/), so the behavior @GieltjE has seen is probably because of the **prefetch=yes** setting.

The expired record will be served to the client only, if the setting **serve-expired: yes** is configured, as pointed out by @anon55913113.

So I changed my unbound config, ensuring the following settings are already there or added, and there are no cache-xxx-ttl settings in the config.:

```auto
prefetch: yes
serve-expired: yes
serve-expired-ttl: 0
serve-expired-ttl-reset: yes

```

Some questions remain, regarding the use of Redis, as pointed out by @DL6ER (I still don’t see the need to add more moving gears)

Restarted unbound, emptied the Redis cache (redis-cli FLUSHALL), so it's to soon to tell what the result will be, however, it remains fascinating and worth discussing...

---

_[View the full topic](https://discourse.pi-hole.net/t/pihole-ftl-unbound-with-cache-db-module-options-redis/24676)._
