-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.php
More file actions
32 lines (26 loc) · 723 Bytes
/
Copy pathindex.php
File metadata and controls
32 lines (26 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
ob_start();
/**
* index.php file
*
* @category index.php file designed as front controller
* @author M.Noermoehammad
* @license https://opensource.org/licenses/MIT MIT License
* @version 1.0
* @since Since Release 1.0
*
*/
require dirname(__FILE__) . '/lib/main.php';
// Check if a valid cache file exists and serve it
if (function_exists('page_cache_exists') && page_cache_exists()) {
page_cache_serve();
}
// Start capturing output if caching is enabled
if (function_exists('page_cache_start')) {
page_cache_start();
}
$app->dispatcher->dispatch();
// Capture the output and save it to the cache if it was a miss
if (function_exists('page_cache_finish')) {
page_cache_finish();
}