Hello,
Pour afficher la valeur d’une configuration on fait :
Comment on peut faire pour afficher une valeur en cache ?
En js tout comme en html of course
j’ai besoin des deux.
Par exemple appeler la fonction en js : eqLogic.getCache ?
Hello,
Pour afficher la valeur d’une configuration on fait :
Comment on peut faire pour afficher une valeur en cache ?
En js tout comme en html of course
j’ai besoin des deux.
Par exemple appeler la fonction en js : eqLogic.getCache ?

Sur un de mes plugins, j’ai récupéré le cache de l’équipement en Ajax.
$.ajax({
type: "POST",
url: "plugins/Your_plugin/core/ajax/Your_plugin.ajax.php",
data: {
action: "getCache",
id: _eqLogic.id
},
dataType: 'json',
error: function(request, status, error) {
handleAjaxError(request, status, error);
},
success: function(data) {
...
if (init('action') == 'getCacheAndConfig') {
$result = array();
$eqLogic = your_plugin::byId(init('id'));
if (!is_object($eqLogic)) {
throw new Exception(__('Your_plugin eqLogic non trouvé : ', __FILE__) . init('id'));
}
$result = array("cache" => $eqLogic->getCache());
ajax::success($result);
}
Je ne sais pas s’il il y une solution plus directe.
Oui, je voulais faire ça en 2ème temps.
J’te remercie pour le code
ça me fera gagner du temps !