Difference between cache and cache optimizer?

In the query log of Pi Hole v6, what's the difference between "served from cache" and "served by cache optimizer"? I can't seem to find any information on what the cache optimizer is.

This indicates that Pi-hole served an immediate reply (with an intentionally reduced TTL) from a cached previous lookup, despite the TTL of that original reply having expired already. At the same time, Pi-hole will request resolution from its upstream servers and refresh its cache, so that clients will have current data as soon as they request resolution anew.

Thank you for the explanation! Marking as solution.