From f386fc4a109c8ee12c6dc51333f0ecdf077268a8 Mon Sep 17 00:00:00 2001 From: Teromene Date: Fri, 4 Dec 2015 09:19:05 +0000 Subject: [PATCH] Added the Cache cleaning system. --- index.php | 7 +++---- lib/Cache.php | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 63d72b8..5578b2d 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,6 @@ getBasename(), array('.', '..'))) + continue; + elseif ($cacheFile->isFile()) { + if( filemtime($cacheFile->getPathname()) < $cacheTimeLimit ) + unlink( $cacheFile->getPathname() ); + } + } + } + } + +}