Consider following back-end script.
<?php
if (isset($_GET["req"])) {
$req = $_GET["req"];
if ($req == "delete") {
// Very intense calculation which finally results in deletion.
}
if ($req == "add") {
// Very intense calculation which finally results in addition.
}
if ($req == "modification") {
// Very intense calculation which finally results in modification.
}
}
?>
Let's say there's 10 people using website intensively at the same time. Does using example.php?req=modification
force Apache to rerun the entire file, or does Apache cache it for better performance and ignore every other piece that does not match?
Could I use thisexample.php?req=add
example.php?req=remove
example.php?req=mod
without performance loss relative to this:/files/add.php
/files/remove.php
/files/modify.php
?
This would help in progress indication, seperating tasks instead of bunchprocessing and requesting 3 different files.