cvsuser 02/06/18 14:15:44
Modified: P5EEx/Blue/P5EEx/Blue Repository.pm
Log:
enabled clearing the cache for a single table
Revision Changes Path
1.16 +8 -4 p5ee/P5EEx/Blue/P5EEx/Blue/Repository.pm
Index: Repository.pm
===================================================================
RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/Repository.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -r1.15 -r1.16
--- Repository.pm 8 Jun 2002 02:54:06 -0000 1.15
+++ Repository.pm 18 Jun 2002 21:15:44 -0000 1.16
@@ -1,6 +1,6 @@
#############################################################################
-## $Id: Repository.pm,v 1.15 2002/06/08 02:54:06 spadkins Exp $
+## $Id: Repository.pm,v 1.16 2002/06/18 21:15:44 spadkins Exp $
#############################################################################
package P5EEx::Blue::Repository;
@@ -1835,7 +1835,8 @@
=head2 clear_cache()
* Signature: $rep->clear_cache();
- * Param: void
+ * Signature: $rep->clear_cache($table);
+ * Param: $table string
* Return: void
* Throws: P5EEx::Blue::Exception::Repository
* Since: 0.01
@@ -1846,10 +1847,13 @@
=cut
+use Carp;
+
sub clear_cache {
my ($self, $table) = @_;
- my (@tables, $rows);
- @tables = (defined $table) ? ($table) : @{$self->{tables}};
+ my (@tables, $tables, $rows);
+ $tables = $self->{tables};
+ @tables = (defined $table) ? ($table) : (defined $tables ? @$tables : ());
foreach $table (@tables) {
$rows = $self->{table}{$table}{cache}{rows};