From 74a098d810897572025b30b40da2247aa9e4ee93 Mon Sep 17 00:00:00 2001 From: tbs60 Date: Fri, 27 Dec 2024 09:29:39 +0800 Subject: [PATCH] feat:support result cache, issue: #315 --- src/backend/booster/bk_dist/handler/ue4/cc/handler.go | 2 +- src/backend/booster/bk_dist/handler/ue4/cl/handler.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/booster/bk_dist/handler/ue4/cc/handler.go b/src/backend/booster/bk_dist/handler/ue4/cc/handler.go index 141d4476..e52aa62a 100644 --- a/src/backend/booster/bk_dist/handler/ue4/cc/handler.go +++ b/src/backend/booster/bk_dist/handler/ue4/cc/handler.go @@ -1418,7 +1418,7 @@ func (cc *TaskCC) preBuild(args []string) error { cc.serverSideArgs = serverSideArgs if cc.SupportResultCache(args) != resultcache.CacheTypeNone { - cc.resultCacheArgs = make([]string, 0, len(cc.serverSideArgs)) + cc.resultCacheArgs = make([]string, len(cc.serverSideArgs)) copy(cc.resultCacheArgs, cc.serverSideArgs) for index := range cc.resultCacheArgs { if cc.resultCacheArgs[index] == cc.preprocessedFile { diff --git a/src/backend/booster/bk_dist/handler/ue4/cl/handler.go b/src/backend/booster/bk_dist/handler/ue4/cl/handler.go index 4cda5fbc..a1906dbe 100644 --- a/src/backend/booster/bk_dist/handler/ue4/cl/handler.go +++ b/src/backend/booster/bk_dist/handler/ue4/cl/handler.go @@ -1248,7 +1248,7 @@ func (cl *TaskCL) preBuild(args []string) error { cl.serverSideArgs = serverSideArgs if cl.SupportResultCache(args) != resultcache.CacheTypeNone { - cl.resultCacheArgs = make([]string, 0, len(cl.serverSideArgs)) + cl.resultCacheArgs = make([]string, len(cl.serverSideArgs)) copy(cl.resultCacheArgs, cl.serverSideArgs) for index := range cl.resultCacheArgs { if cl.resultCacheArgs[index] == cl.preprocessedFile {