Переглянути джерело

添加 缓存图片删除

ajun 4 роки тому
батько
коміт
8867212b99
1 змінених файлів з 12 додано та 1 видалено
  1. 12 1
      app/Services/DeliveryService.php

+ 12 - 1
app/Services/DeliveryService.php

@@ -60,7 +60,7 @@ class DeliveryService
      */
     public function customProcessing(array $items): array
     {
-        foreach ($items as $key => $item) {
+        foreach ($items as $key => &$item) {
             if ($item['is_process'] == true) continue;
             switch ($item['component_type']) {
                 case 'TB':
@@ -97,5 +97,16 @@ class DeliveryService
         }
     }
 
+    public function pushClearCache($path)
+    {
+        if (!Cache::has("print-template-file-list")){
+            Cache::put('print-template-file-list',[$path]);
+            return;
+        }
+        $arr = Cache::get("print-template-file-list");
+        $arr[] = $path;
+        Cache::put('print-template-file-list',$arr);
+    }
+
 
 }