#2223 closed defect (bug) (fixed)
Cache flusher is not working reliably
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0 |
Component: | Administration | Keywords: | bg|has-patch |
Focuses: | Cc: |
Description
On some setups, the flusher doesn't seem to work at all resulting in strangeness following upgrades. I suspect the problem is with our fallback glob(). Replace the flush code with something better.
Attachments (1)
Change History (6)
#3
@
19 years ago
- Keywords bg|has-patch added
- Resolution fixed deleted
- Status changed from closed to reopened
I had some problems with this hanging on Windows/Apache. Possibly relates to #2278.
It's not entirely that the cache directory uses the wrong slash by default (forward slashes usually work on Windows in PHP anyway) but that rm_cache_dir() only rtrim()s the system slash when the string is hardcoded to contain a forward slash by default.
And then when it fails to delete a directory, the directory is continuously added back into the stack, causing the hang. This could be a problem on systems that - for some crazy reason - have had an errant permission change on a cache directory making it undeleteable.
The attached patch queues all directories that are scheduled for deletion into the stack first, deleting files as it goes, then flips the stack and deletes the directories from the deepest out to the shallowest. It can still fail to delete a directory, but such an error won't cause an infinite loop.
[3400]