Created cache directory
Moved server routine to functions.php