mirror of
https://github.com/UnickSoft/graphonline.git
synced 2025-07-01 23:36:00 +00:00
Added cache for plugin list
This commit is contained in:
parent
6f5afdbc4f
commit
8a3ad5c598
@ -1,7 +1,25 @@
|
|||||||
<?
|
<?
|
||||||
|
|
||||||
$jsScripts = glob("../script/plugins/*.js");
|
$tempFilename = "../tmp/pluginsList.txt";
|
||||||
|
|
||||||
echo json_encode($jsScripts);
|
if (isset($_GET["reset"]))
|
||||||
|
{
|
||||||
|
unlink($tempFilename);
|
||||||
|
}
|
||||||
|
|
||||||
|
$res = "";
|
||||||
|
if (!file_exists($tempFilename))
|
||||||
|
{
|
||||||
|
$jsScripts = glob("../script/plugins/*.js");
|
||||||
|
$res = json_encode($jsScripts);
|
||||||
|
file_put_contents ($tempFilename, $res);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$res = file_get_contents($tempFilename);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo $res;
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user