Opened 3 years ago
Last modified 3 years ago
#2476 new Aufgabe
clear_dir() Funktion gegebenenfalls schneller machen
| Reported by: | noRiddle | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | modified-shop-2.1.0.0 |
| Component: | Admin | Version: | 2.0.7.2 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description
Wenn man viele Kategorie- und Produkt-Seite in einem Shop hat dauert es bei aktiviertem Cache teilweise ewig lange bis der Cache geleert ist und die Funktion läuft sogar oft ins Timeout.
Ich würde deshalb vorschlagen die Funktion clear_dir() so zu ändern, daß sie exec(SHELL_COMMAND) benutzt wenn möglich.
Eine effektive Variante herauszufinden ob exec() zur Verfügung steht könnte diese sein (welche ich auf stackoverflow gefunden habe):
$exec_enabled = function_exists('exec') && !in_array('exec', array_map('trim', explode(', ', ini_get('disable_functions')))) && strtolower(ini_get('safe_mode')) != 1;
Dann könnte man abfragen
if($exec_enabled) {
exec("rm -r $dir", $out, $ret);
} else {
OLD_FUNCTION_ROUTINE
}
Was Phpfastcache betrifft habe ich mir noch nicht angeschaut wie clear() genau vorgeht. Jedenfalls könnte man wohl auch dort die Funktion verbessern indem man die Ausführung schneller macht und ein Timeout vermeidet.
Gruß,
noRiddle
Attachments (0)
Change History (1)
comment:1 by , 3 years ago
| Milestone: | modified-shop-2.0.8.0 → modified-shop-2.1.0.0 |
|---|
