Fix cache for plugin manager

This commit is contained in:
Ibnu Maksum 2023-07-28 15:38:52 +07:00
parent 39d3c683bc
commit 4e86f4cb02
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
3 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@
- Change registration design Form - Change registration design Form
- Add Setting to disable Voucher - Add Setting to disable Voucher
- Fix Title for PPPOE plans - Fix Title for PPPOE plans
- Fix Plugin Cache
## 2023.6.20 ## 2023.6.20
- Hide time for Created date. - Hide time for Created date.

View File

@ -20,7 +20,7 @@ if ($admin['user_type'] != 'Admin') {
} }
$cache = File::pathFixer('system/cache/plugin_repository.json'); $cache = File::pathFixer('system/cache/plugin_repository.json');
if (file_exists($cache) && time() - filemtime($cache) > (24 * 60 * 60)) { if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) {
$json = json_decode(file_get_contents($cache), true); $json = json_decode(file_get_contents($cache), true);
} else { } else {
$data = file_get_contents($plugin_repository); $data = file_get_contents($plugin_repository);

View File

@ -1,3 +1,3 @@
{ {
"version": "2023.6.20" "version": "2023.7.28"
} }