
Perl::Critic::PPIx::Optimized::Caches - Caches used to optimize Perl::Critic

use Perl::Critic::PPIx::Optimized::Caches qw( NAMES_OF_CACHE_VARIABLES ); Perl::Critic::PPIx::Optimized::Caches::flush_all();

This module provides access to various hashes that are used to optimize the performance of PPI. There are no user-serviceable parts in here.
All hashes are keyed by the memory address of the PPI::Node or <PPI::Element> reference. The hash values are the same as those returned by the PPI methods with the same name as the cache variable. Available caches are:
Points to the previous significant sibling of the node or element.
Points to the next significant sibling of the node or element.
Points to the string representation of the node. This usually only applies to a PPI::Document.
Points to the string representation of the node or element. This applies to a PPI::Node or PPI::Element.
This one is a different: the keys are the PPI class names of all the children of a node, and the values are array of references to all the children of a particular class. This is used to expedite searching for elements by type, which is the most common type of search that we do.

Clears all caches. This method is not exported.

Jeffrey Ryan Thalhammer <thaljef@cpan.org>

Copyright (c) 2005-2009 Jeffrey Ryan Thalhammer. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.