---
name: "Zonemaster::Engine::Nameserver::Cache"
section: "3pm"
platform: "linux"
package: "libzonemaster-perl"
version: "7.1.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Zonemaster::Engine::Nameserver::Cache"
---

# Zonemaster::Engine::Nameserver::Cache(3pm)

shared caches for nameserver objects

## 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.
