Rename cache keys

This commit is contained in:
Laurent Destailleur 2021-02-20 18:25:48 +01:00
parent 341cd06252
commit 1dd1dcefc5

View File

@ -56,7 +56,7 @@ function societe_prepare_head(Societe $object)
//$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); //$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
$nbContact = 0; $nbContact = 0;
$cachekey = 'thirdparty_'.$object->id.'_countcontacts'; $cachekey = 'count_contacts_thirdparty_'.$object->id;
$dataretrieved = dol_getcache($cachekey); $dataretrieved = dol_getcache($cachekey);
if (!is_null($dataretrieved)) { if (!is_null($dataretrieved)) {
@ -275,7 +275,7 @@ function societe_prepare_head(Societe $object)
$nbNotif = 0; $nbNotif = 0;
// Enable caching of thirdrparty count notifications // Enable caching of thirdrparty count notifications
$cachekey = 'thirdparty_'.$object->id.'_countnotifications'; $cachekey = 'count_notifications_thirdparty_'.$object->id;
$dataretrieved = dol_getcache($cachekey); $dataretrieved = dol_getcache($cachekey);
if (!is_null($dataretrieved)) { if (!is_null($dataretrieved)) {
$nbNotif = $dataretrieved; $nbNotif = $dataretrieved;
@ -341,7 +341,7 @@ function societe_prepare_head(Societe $object)
$nbEvent = 0; $nbEvent = 0;
// Enable caching of thirdrparty count actioncomm // Enable caching of thirdrparty count actioncomm
$cachekey = 'thirdparty_'.$object->id.'_countevents'; $cachekey = 'count_events_thirdparty_'.$object->id;
$dataretrieved = dol_getcache($cachekey); $dataretrieved = dol_getcache($cachekey);
if (!is_null($dataretrieved)) { if (!is_null($dataretrieved)) {
$nbEvent = $dataretrieved; $nbEvent = $dataretrieved;