Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cache::basecache(3pm) [debian man page]

Cache::BaseCache(3pm)					User Contributed Perl Documentation				     Cache::BaseCache(3pm)

NAME
Cache::BaseCache -- abstract cache base class DESCRIPTION
BaseCache provides functionality common to all instances of a cache. It differes from the CacheUtils package insofar as it is designed to be used as superclass for cache implementations. SYNOPSIS
Cache::BaseCache is to be used as a superclass for cache implementations. The most effective way to use BaseCache is to use the protected _set_backend method, which will be used to retrieve the persistance mechanism. The subclass can then inherit the BaseCache's implentation of get, set, etc. However, due to the difficulty inheriting static methods in Perl, the subclass will likely need to explicitly implement Clear, Purge, and Size. Also, a factory pattern should be used to invoke the _complete_initialization routine after the object is constructed. package Cache::MyCache; use vars qw( @ISA ); use Cache::BaseCache; use Cache::MyBackend; @ISA = qw( Cache::BaseCache ); sub new { my ( $self ) = _new( @_ ); $self->_complete_initialization( ); return $self; } sub _new { my ( $proto, $p_options_hash_ref ) = @_; my $class = ref( $proto ) || $proto; my $self = $class->SUPER::_new( $p_options_hash_ref ); $self->_set_backend( new Cache::MyBackend( ) ); return $self; } sub Clear { foreach my $namespace ( _Namespaces( ) ) { _Get_Backend( )->delete_namespace( $namespace ); } } sub Purge { foreach my $namespace ( _Namespaces( ) ) { _Get_Cache( $namespace )->purge( ); } } sub Size { my $size = 0; foreach my $namespace ( _Namespaces( ) ) { $size += _Get_Cache( $namespace )->size( ); } return $size; } SEE ALSO
Cache::Cache, Cache::FileCache, Cache::MemoryCache AUTHOR
Original author: DeWitt Clinton <dewitt@unto.net> Last author: $Author: dclinton $ Copyright (C) 2001-2003 DeWitt Clinton perl v5.12.4 2009-03-01 Cache::BaseCache(3pm)

Check Out this Related Man Page

Cache::BaseCacheTester(3pm)				User Contributed Perl Documentation			       Cache::BaseCacheTester(3pm)

NAME
Cache::BaseCacheTester -- abstract cache tester base class DESCRIPTION
BaseCacheTester provides functionality common to all instances of a class that will test cache implementations. SYNOPSIS
BaseCacheTester provides functionality common to all instances of a class that will test cache implementations. package Cache::MyCacheTester; use vars qw( @ISA ); use Cache::BaseCacheTester; @ISA = qw( Cache::BaseCacheTester ); METHODS
new( $base_test_count ) Construct a new BaseCacheTester and initialize the test count to $base_test_count. ok( ) Print a message to stdout in the form "ok $test_count" and incremements the test count. not_ok( $message ) Print a message to stdout in the form "not ok $test_count # $message " and incremements the test count. skip( $message ) Print a message to stdout in the form "ok $test_count # skipped $message " and incremements the test count. SEE ALSO
Cache::CacheTester, Cache::SizeAwareCacheTester AUTHOR
Original author: DeWitt Clinton <dewitt@unto.net> Last author: $Author: dclinton $ Copyright (C) 2001-2003 DeWitt Clinton perl v5.12.4 2009-03-01 Cache::BaseCacheTester(3pm)
Man Page

6 More Discussions You Might Find Interesting

1. HP-UX

Buffer Cache

What is the "Buffer Cache" used for? (1 Reply)
Discussion started by: ALTRUNVRSOFLN
1 Replies

2. UNIX for Dummies Questions & Answers

Cache Fils Size

Greetings, I haven't posted in a while and have a Firefox question. I'm running Firefox 2.0.0.6 on Ubuntu 710 and am wondering if there is a way to increase the maximum size of files captured into the cache. The cache size was 50 megabytes and that seemed limit the files to 24 Meg. Increasing... (0 Replies)
Discussion started by: psikeyhackr
0 Replies

3. UNIX for Dummies Questions & Answers

Information About raidctl

Hello people i have a question, when i put raidctl -l on sun fire show this Volume Size Stripe Status Cache RAID Sub Size Level Disk ... (0 Replies)
Discussion started by: enkei17
0 Replies

4. Shell Programming and Scripting

Scripting question: Altering 2 field.

Hi Experts, I want to alter two filed of my data file: The _new should come to 2nd column, and _new to be removed from 4rth column, please advise, datafile.txt aa /dev/vgAA/lvol1 bb /dev/vgAA_new/lvol1 aa /dev/vgAA1/lvol2 bb /dev/vgAA1_new/lvol2 aa /dev/vgAC/lvol1 bb... (5 Replies)
Discussion started by: rveri
5 Replies

5. Linux

getting info on Cache Size, Data Cache etc..

Hi all I saw in Microsoft web site www.SysInternals.com a tool called CoreInfo from able to print out on screen the size of the Data and Instruction caches of your processor, the Locigal to Physical Processor mapping, the number of the CPU sockets. etc.. Do you know if in Linux is available a... (2 Replies)
Discussion started by: manustone
2 Replies

6. Shell Programming and Scripting

Finding difference in between two array's of strings

Hi, Can anybody help me in finding the difference between two array elements with the help of code pls. purge=("Purge Concurrent Request and/or Manager Data" "Purge Signon Audit data" "Purge Obsolete Workflow Runtime Data" "Purge Logs and Closed System Alerts") purge_1=("Purge Obsolete... (3 Replies)
Discussion started by: Y.balakrishna
3 Replies