4 * Takes a cache miss and generates the file if it is valid.
5 * @note Use ?purge=1 in order to force regeneration of the file
10 $page = get_page_from_get();
11 if ($page === false) $page = get_page_from_server();
12 $page = normalize_index($page, $directory_index);
13 list($page, $page_src) = calculate_page_and_src($page);
15 // validation functions will quit if something goes wrong
16 validate_page($page, $allowed_dirs, $filename_chars);
17 validate_page_source($page_src);
19 try_cache($page, $page_src);
21 echo generate_page($page, $page_src);