 
   if (!strcmp(buff, "report")) {
     reportStats();
+    return;
+  }
+
+  if (!strcmp(buff, "cache")) {
+    char msg[255];
+    unsigned long count = listDir(SPIFFS, "/", "");
+
+    snprintf(msg, sizeof(msg), "[%s] Number of files in the cache: %lu", pname, count);
+    client.publish(log_topic, msg);
+    Serial.println(msg);
     return;
   }
 

  for (int i = 0; i < uid.size; i++) {
    path += String(uid.uidByte[i], DEC);
    if (i == 0)
      path += " / ";
    else
      path += ".";
  };

  if (p)
    strncpy(pname, p + 1, sizeof(pname));

  if ((p = index(pname, '.')))
    * p = '\0';

#ifndef LOCALMQTT
  // Alert us to safe, non production versions.
