<<

NAME

pfconfig::manager

DESCRIPTION

pfconfig::manager

This module controls the access, buikd and expiration of the config namespaces

This module will serve as an interface to build and cache the namespaces

It will first search in the raw in-memory cache, then the layer 2 backend (pfconfig::backend), then it will build the associated object of the namespace

USAGE

In order to access the configuration namespaces : - Instanciate the object - Then call get_cache on a specific namespace in order to fetch it - The classes that build the namespaces are located in pfconfig::namespaces

config_builder

Builds the object associated to a namespace See it as a mini-factory

get_namespace

Dynamicly requires the namespace module and instanciates the object associated to it

new

Constructor for the manager

init_cache

Creates the backend and internal data structures for the L1 and L2 cache

touch_cache

Updates the timestamp on the control file That sends the signal that the raw memory is expired

get_cache

Gets a namespace either in the L1, L2 or L3 (builds it) Will use the memorized_at hash to know if it's still valid It should not have to build the L3 since that's the slowest. The L3 should be built externally and this should only have to call the L2

cache_resource

Builds the resource associated to a namespace and then caches it in the L1 and L2

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

expire

Expire a namespace in the cache and rebuild it If the namespace has child resources, it expires them too. Will expire the memory cache after building

list_namespaces

Method that lists the namespaces available to pfconfig Has an ignore list declared below

preload_all

Method that preloads all the objects through the get_cache method Will build the object if needed and make sure it's in L1

expire_all

Method that expires all the namespaces defined by list_namespaces

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 412:

=back without =over

<<