ReportCache |
![]() |
ReportCache - store report-related lists
Ian Malpass <ian@aptest.com>
Copyright 2001-2009 Applied Testing and Technology, Inc. All Rights Reserved.
use ReportCache;
# Open the Database for writing
my $rc = new ReportCache(suite, 1);
# Cache a session list
my $md5 = $rc->storeSessList( @sList );
# get the list for a report
my @list = $rc->getSessList( $md5 );
# release the database
$rc->save;
$rc->release;
The ReportCache is a persistent store for data relating to reports. Currently it stores the session lists to be used.
$rdb = new ReportCache(suite, [read/write [, timeout [, path]]]);
Creates a new report cache object
returns a path to the cache file.
$rc->print();
$rc->print( key );
$rc->print( key, id );
returns the string-ified version of the entire database, or just the contents of the data for "key", or just the "key" item stored under "id".
$status = $rc->saveAsText();
Returns the output of the database's save method, but forcing the database to write out into a text file instead of a DBM file.
returns the path saved into, or undef if the save failed.
my $md5 = $rc->storeSessList( @sessList );
Stores a copy of @sessList in the cache, and returns the key to use to access it. The key is an MD5 hash of the comma-separated sessList.
my @list = $rc->getSessList( $md5 );
Retrieves a previously-stored session list, using the MD5 hash returned from storeSessList().
Copyright © 2000-2008 Applied Testing and Technology, Inc. All rights reserved.