pfconfig::manager
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
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
Builds the object associated to a namespace See it as a mini-factory
Dynamicly requires the namespace module and instanciates the object associated to it
Constructor for the manager
Creates the backend and internal data structures for the L1 and L2 cache
Updates the timestamp on the control file That sends the signal that the raw memory is expired
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
Builds the resource associated to a namespace and then caches it in the L1 and L2
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 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
Method that lists the namespaces available to pfconfig Has an ignore list declared below
Method that preloads all the objects through the get_cache method Will build the object if needed and make sure it's in L1
Method that expires all the namespaces defined by list_namespaces
Inverse inc. <info@inverse.ca>
Copyright (C) 2005-2015 Inverse inc.
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.
Hey! The above document had some coding errors, which are explained below:
=back without =over