Implement Cache for PmLicenseManager.
This commit is contained in:
David Callizaya
2017-09-01 15:53:30 -04:00
parent 6bd23225c6
commit 5d4a7edd12
2 changed files with 15 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
<?php
use ProcessMaker\Plugins\PluginRegistry;
use Illuminate\Support\Facades\Cache;
/**
* class.pmLicenseManager.php
@@ -10,6 +10,7 @@ use ProcessMaker\Plugins\PluginRegistry;
class PmLicenseManager
{
const CACHE_KEY = 'license';
private static $instance = null;
@@ -474,6 +475,7 @@ class PmLicenseManager
$tr->setLicenseType ( $LicenseType );
$res = $tr->save ();
Cache::forget(PmLicenseManager::CACHE_KEY . '.' . SYS_SYS);
} catch ( Exception $e ) {
G::pr($e);
}