<<

NAME

pfconfig::cached

DESCRIPTION

pfconfig::cached

This module serves as an interface to create a cached resource that will proxy the access to it's attributes to the pfconfig service

It is used as a bridge between a pfconfig namespace element and a tied element without having a memory footprint unless when accessing data in the element

USAGE

This class is abstract and should be a superclass of an object that implements Tied

ENCODER

The encoder for the communications with pfconfig See CLONE where this needs to be recreated

DECODER

The decoder for the communications with pfconfig See CLONE where this needs to be recreated

new

Creates the object but shouldn't be used since it's made as an interface to use pfconfig

get_socket

Method that gives an IO::Socket to communicate with pfconfig

init

Method called during the initialisation process Should set element_socket_method

get_from_subcache

Tries to get an element from the subcache (per process) It also checks if the subcache is still valid It will return undef if it's not there or invalid

get_from_subcache

Sets an element in the subcache so it can be reused accross accesses

_get_from_socket

Method that gets a key from pfconfig Will wait for the connection if pfconfig is not alive Will send a JSON payload for the request Will receive the amount of lines of the reply then the reply as a Sereal string

is_valid

Method that is used to determine if the object has been refreshed in pfconfig Uses the control files in var/control and the memorized_at hash to know if a namespace has expired

CLONE

Called when cloning the module. Used to create new encoders, if not they'll be undefed

AUTHOR

Inverse inc. <info@inverse.ca>

COPYRIGHT

Copyright (C) 2005-2015 Inverse inc.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 257:

=back without =over

<<