The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Zonemaster::Engine::Nameserver::Cache - shared caches for nameserver objects

SYNOPSIS

    This class should not be used directly.

ATTRIBUTES

address

A Net::IP::XS object holding the nameserver's address.

data

A reference to a hash holding the cache of sent queries. Not meant for external use.

CLASS METHODS

get_cache_type()
    my $cache_type = get_cache_type( Zonemaster::Engine::Profile->effective );

Get the cache type value from the profile, i.e. the name of the cache module to use.

Takes a Zonemaster::Engine::Profile object.

Returns a string.

get_cache_class()
    my $cache_class = get_cache_class( 'LocalCache' );

Get the cache adapter class for the given database type.

Takes a string (cache database type).

Returns a string, or throws an exception if the cache adapter class cannot be loaded.

empty_cache()

Clear the cache.