use Civi:cache() for extension cache
This commit is contained in:
parent
1d5c69f470
commit
677f673247
1 changed files with 3 additions and 5 deletions
|
@ -11,8 +11,6 @@ use CRM_TwingleCampaign_ExtensionUtil as E;
|
||||||
*/
|
*/
|
||||||
class CRM_TwingleCampaign_Utils_ExtensionCache {
|
class CRM_TwingleCampaign_Utils_ExtensionCache {
|
||||||
|
|
||||||
protected static $_instance = NULL;
|
|
||||||
|
|
||||||
private $customFieldMapping;
|
private $customFieldMapping;
|
||||||
|
|
||||||
private $translations;
|
private $translations;
|
||||||
|
@ -26,10 +24,10 @@ class CRM_TwingleCampaign_Utils_ExtensionCache {
|
||||||
* @return self|null
|
* @return self|null
|
||||||
*/
|
*/
|
||||||
public static function getInstance() {
|
public static function getInstance() {
|
||||||
if (null === self::$_instance) {
|
if (null === Civi::cache()->get('twinglecampaign_cache')) {
|
||||||
self::$_instance = new self;
|
Civi::cache()->set('twinglecampaign_cache', new self);
|
||||||
}
|
}
|
||||||
return self::$_instance;
|
return Civi::cache()->get('twinglecampaign_cache');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue