NAME
Math::PartialOrder::LRUCaching - class for partial orders using the Tie::Cache module to cache lookup results.
SYNOPSIS
use Math::PartialOrder::LRUCaching;
...
REQUIRES
Tie::Cache, Math::PartialOrder, Math::PartialOrder::Std, Math::PartialOrder::Caching.
DESCRIPTION
Math::PartialOrder::LRUCaching is a Math::PartialOrder::Base implementation for rooted finite partial orders (datatype hierarchies) which caches the results of inheritance- and type-operation-lookups in a Tie::Cache
object, which implements an LRU (least recently used) cache. It inherits from Math::PartialOrder::Caching.
Math::PartialOrder::LRUCaching supports all methods described in Math::PartialOrder::Base.
PACKAGE-GLOBAL VARIABLES
$CACHE_KEY_SEP
This variable is imported from Math::PartialOrder::Caching. Its value is a perl string which will be used as a separator between operation- and/or type-identifiers for purposes of placing them in the cache.
$IN_CACHE_ATTRS
A hash reference used to generate the inheritance-cache for objects created with the
new()
method. The default value is:{ MaxCount => 5000 }
$OP_CACHE_ATTRS
A hash reference used to generate the operations-cache for objects created with the
new()
method. The default value is:{ MaxCount => 5000 }
METHODS
Construction & Initialization
new(\%args)
Creates and returns a new Math::PartialOrder::LRUCaching object. Recognized keys for \%args are:
root => $r
Root the new partial order at $r. Default is 'BOTTOM'.
incache_attrs => \%attrs
Use \%attrs as the attribute-arguments to
tie()
for the inheritance-cache. Default is$IN_CACHE_ATTRS
.opcache_attrs => \%attrs
Use \%attrs as the attribute-arguments to
tie()
for the operations-cache. Default is$OP_CACHE_ATTRS
.
Additional Methods
None.
ACKNOWLEDGEMENTS
perl by Larry Wall.
Tie::Cache by Joshua Chamas <chamas@alumni.stanford.org>.
AUTHOR
Bryan Jurish <jurish@ling.uni-potsdam.de>
COPYRIGHT
Copyright (c) 2001, Bryan Jurish. All rights reserved.
This package is free software. You may redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl(1). Math::PartialOrder(3pm). Math::PartialOrder::Base(3pm). Math::PartialOrder::Std(3pm). Math::PartialOrder::Caching(3pm). Math::PartialOrder::CMasked(3pm). Math::PartialOrder::CEnum(3pm). Math::PartialOrder::Loader(3pm). Tie::Cache(3pm).