Masahiro Nagano > DBIx-DSN-Resolver-Cached-0.03 > DBIx::DSN::Resolver::Cached

Download:
DBIx-DSN-Resolver-Cached-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source   Latest Release: DBIx-DSN-Resolver-Cached-0.04

NAME ^

DBIx::DSN::Resolver::Cached - Cached resolver for DBIx::DSN::Resolver

SYNOPSIS ^

  use 5.10.0;
  use DBIx::DSN::Resolver::Cached;

  sub connect_db {
      state $resolver = DBIx::DSN::Resolver::Cached->new(
          ttl => 30,
          negative_ttl => 5,
      );
      my $dsn = $resolver->resolv('dbi:mysql:database=mytbl;host=myserver.example');
      DBI->connect($dsn,'user','password');
  }

DESCRIPTION ^

DBIx::DSN::Resolver::Cached is extension module of DBIx::DSN::Resolver. This module allows CACHE resolver response, useful for reduce load of DNS. DBIx::DSN::Resolver::Cached also supports DNS-RR

OPTIONS ^

ttl: Int

positive cache ttl in seconds. (default: 5)

negative_ttl: Int

negative cache ttl in seconds. (default: 1)

cache: Object

Cache object, requires support get and set methods. default: Cache::Memory::Simple is used

AUTHOR ^

Masahiro Nagano <kazeburo {at} gmail.com>

SEE ALSO ^

DBIx::DSN::Resolver, Cache::Memory::Simple

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: