Project

General

Profile

Actions

Bug #2285

closed

swapstate_check.php is being run when the Squid cache is null

Added by Phillip Davis over 13 years ago. Updated over 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/13/2012
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:

Description

When Squid is not keeping a cache (e.g. on nanobsd by default, or of the user doesn't want a cache), swapstate_check.php is still running from crontab. It logs a 'Warning: filesize(): stat failed" message because there is no swap.state file.
Perhaps the swapstate_check.php entry should not be in crontab at all, but that requires a bunch of extra tests make sure it is added to and removed from crontab correctly as the Squid cache settings are changed.
The attached version of swapstate_check.php first tests if harddisk_cache_system is null in the config, and only does the checks if it is NOT null.


Files

swapstate_check.php (2.45 KB) swapstate_check.php updated to handle null case Phillip Davis, 03/13/2012 08:26 AM
Actions

Also available in: Atom PDF