2 |
## $Id$ |
## $Id$ |
3 |
## ------------------------------------------------------------------------ |
## ------------------------------------------------------------------------ |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.3 2003/06/25 23:37:04 joko |
6 |
|
## + sub clearProxyCache |
7 |
|
## |
8 |
|
## Revision 1.2 2003/02/20 21:09:59 joko |
9 |
|
## modified runtime namespace hierarchy |
10 |
|
## |
11 |
## Revision 1.1 2003/02/11 09:46:09 joko |
## Revision 1.1 2003/02/11 09:46:09 joko |
12 |
## + initial commit |
## + initial commit |
13 |
## |
## |
64 |
#print Dumper($self); |
#print Dumper($self); |
65 |
#exit; |
#exit; |
66 |
|
|
67 |
my $proxyObj = $self->{app}->{import}->remote('HttpProxy'); |
my $proxyObj = $self->{app}->{storage}->{import}->remote('HttpProxy'); |
68 |
my @results = $self->{app}->{import}->select($proxyObj, $proxyObj->{url} eq $url); |
my @results = $self->{app}->{storage}->{import}->select($proxyObj, $proxyObj->{url} eq $url); |
69 |
my $content = $results[0]->{content} if $results[0]->{content}; |
my $content = $results[0]->{content} if $results[0]->{content}; |
70 |
my $oktxt = "no"; |
my $oktxt = "no"; |
71 |
if ($content) { |
if ($content) { |
91 |
age => $response->current_age(), |
age => $response->current_age(), |
92 |
); |
); |
93 |
my $oktxt = "no"; |
my $oktxt = "no"; |
94 |
if ($self->{app}->{import}->insert($proxyObj)) { |
if ($self->{app}->{storage}->{import}->insert($proxyObj)) { |
95 |
$oktxt = "ok"; |
$oktxt = "ok"; |
96 |
} |
} |
97 |
$logger->debug( __PACKAGE__ . "->savePageToProxy ...$oktxt" ); |
$logger->debug( __PACKAGE__ . "->savePageToProxy ...$oktxt" ); |
125 |
return $content; |
return $content; |
126 |
} |
} |
127 |
|
|
128 |
|
sub clearProxyCache { |
129 |
|
my $self = shift; |
130 |
|
my $proxyObj = $self->{app}->{storage}->{import}->remote('HttpProxy'); |
131 |
|
#my @results = $self->{app}->{storage}->{import}->select($proxyObj, $proxyObj->{url} eq $url); |
132 |
|
my @results = $self->{app}->{storage}->{import}->select($proxyObj); |
133 |
|
$self->{app}->{storage}->{import}->erase( @results ); |
134 |
|
} |
135 |
|
|
136 |
1; |
1; |
137 |
|
__END__ |