in reply to How the values of hash is refreshed for each request?

Usually, and most easily, done by declaring the variable in a certain scope and leaving and reentering that scope. For instance, putting everything from my %config onward into a subroutine, and calling it as needed, perhaps having it return \%cnf. For how long after setting up %cnf do you need it?