mirror of
https://github.com/webmin/webmin.git
synced 2025-07-29 11:50:54 +00:00
Add function to clear the Webmin cache for a URL
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -11980,6 +11980,24 @@ else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
=head2 clear_http_cache(url)
|
||||
|
||||
If a URL is in the cache, remove it
|
||||
|
||||
=cut
|
||||
sub clear_http_cache
|
||||
{
|
||||
my $cfile = $url;
|
||||
$cfile =~ s/\//_/g;
|
||||
return 0 if (!$cfile);
|
||||
$cfile = "$main::http_cache_directory/$cfile";
|
||||
if (-r $cfile) {
|
||||
&unlink_file($cfile);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
=head2 check_in_http_cache(url)
|
||||
|
||||
If some URL is in the cache and valid, return the filename for it. Mainly
|
||||
|
Reference in New Issue
Block a user