|
Lines 782-787
sub _new_Zconn {
Link Here
|
| 782 |
return $Zconn; |
782 |
return $Zconn; |
| 783 |
} |
783 |
} |
| 784 |
|
784 |
|
|
|
785 |
=head2 flushZconns |
| 786 |
|
| 787 |
Destroys all Zebra connections flushing their caches. |
| 788 |
|
| 789 |
=cut |
| 790 |
|
| 791 |
sub flushZconns { |
| 792 |
my @ZconnKeys = keys%{$context->{"Zconn"}} if ref($context->{"Zconn"}) eq 'HASH'; |
| 793 |
foreach my $key (@ZconnKeys) { |
| 794 |
my $Zc = $context->{"Zconn"}->{$key}; |
| 795 |
$Zc->destroy(); |
| 796 |
delete $context->{"Zconn"}->{$key}; |
| 797 |
} |
| 798 |
} |
| 799 |
|
| 785 |
# _new_dbh |
800 |
# _new_dbh |
| 786 |
# Internal helper function (not a method!). This creates a new |
801 |
# Internal helper function (not a method!). This creates a new |
| 787 |
# database connection from the data given in the current context, and |
802 |
# database connection from the data given in the current context, and |
| 788 |
- |
|
|