I haven't written a dns server so this might be stupid question, but why would differing TTLs be a problem? You'd need just to key your cache with (label, recordtype) tuple, right?
> No uses for this have been found that cannot be better accomplished in other ways. This can, however, cause partial replies (not marked "truncated") from a caching server, where the TTLs for some but not all the RRs in the RRSet have expired.
So the cache could be split up like that, but then it could produce partial results, which is worse than reducing the effective TTL.
> No uses for this have been found that cannot be better accomplished in other ways. This can, however, cause partial replies (not marked "truncated") from a caching server, where the TTLs for some but not all the RRs in the RRSet have expired.
So the cache could be split up like that, but then it could produce partial results, which is worse than reducing the effective TTL.
[1] https://tools.ietf.org/html/rfc2181#section-5.2