PHP-SPF-Check icon indicating copy to clipboard operation
PHP-SPF-Check copied to clipboard

Cache DNS requests

Open Mika56 opened this issue 9 years ago • 1 comments

When doing checks in bulk, having a cache on top of the DNS requests would be nice

Mika56 avatar Aug 23 '16 20:08 Mika56

It should be trivial to create a class implementing DNSRecordGetterInterface using a psr16 cache

use Psr\SimpleCache\CacheInterface;

class DNSRecordCachingGetter implements DNSRecordGetterInterface
{
    public function __construct(DNSRecordGetterInterface $recordGetter, CacheInterface $cache, int $ttl = 600)
}

Mika56 avatar Aug 28 '22 15:08 Mika56