|
|
|
@ -100,7 +100,7 @@ Class SiteController extends Controller {
@@ -100,7 +100,7 @@ Class SiteController extends Controller {
|
|
|
|
|
$cacheKey = $this->getCacheKey('root', 'mp3', $maxScanDeep); |
|
|
|
|
$mp3File = Common::getCacheFromFile($cacheKey); |
|
|
|
|
if (empty($mp3File)) { |
|
|
|
|
$mp3File = $scanner->getDefaultFile('mp3', $defaultCateId); |
|
|
|
|
$mp3File = $scanner->getDefaultFile('mp3'); |
|
|
|
|
if (!empty($mp3File)) { |
|
|
|
|
Common::saveCacheToFile($cacheKey, $mp3File); |
|
|
|
|
} |
|
|
|
@ -126,7 +126,7 @@ Class SiteController extends Controller {
@@ -126,7 +126,7 @@ Class SiteController extends Controller {
|
|
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//TODO: 清空所有缓存 |
|
|
|
|
//清空所有缓存 |
|
|
|
|
public function actionCleancache() { |
|
|
|
|
$code = 1; |
|
|
|
|
$msg = 'OK'; |
|
|
|
@ -136,7 +136,7 @@ Class SiteController extends Controller {
@@ -136,7 +136,7 @@ Class SiteController extends Controller {
|
|
|
|
|
$files = scandir($cacheDir); |
|
|
|
|
foreach($files as $file) { |
|
|
|
|
if (!preg_match('/\.json$/i', $file)) {continue;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unlink("{$cacheDir}{$file}"); |
|
|
|
|
} |
|
|
|
|
}catch(Exception $e) { |
|
|
|
|