@@ -133,14 +133,15 @@ class LayerCache {
133133 }
134134 }
135135
136- private async storeSingleLayerBy ( id : string ) : Promise < number > {
137- const path = this . genSingleLayerStorePath ( id )
138- const key = await this . generateSingleLayerSaveKey ( id )
136+ private async storeSingleLayerBy ( layerId : string ) : Promise < number > {
137+ const path = this . genSingleLayerStorePath ( layerId )
138+ const key = await this . generateSingleLayerSaveKey ( layerId )
139139
140- core . info ( `Start storing layer cache: ${ key } ` )
140+ core . info ( `Start storing layer cache: ${ JSON . stringify ( { layerId , key } ) } ` )
141141 const cacheId = await LayerCache . dismissError ( cache . saveCache ( [ path ] , key ) , LayerCache . ERROR_CACHE_ALREAD_EXISTS_STR , - 1 )
142- core . info ( `Stored layer cache, key : ${ key } , id: ${ cacheId } ` )
142+ core . info ( `Stored layer cache: ${ JSON . stringify ( { key, cacheId } ) } ` )
143143
144+ core . debug ( JSON . stringify ( { log : `storeSingleLayerBy` , layerId, path, key, cacheId} ) )
144145 return cacheId
145146 }
146147
@@ -201,9 +202,12 @@ class LayerCache {
201202 }
202203
203204 private async restoreSingleLayerBy ( id : string ) : Promise < string > {
204- core . debug ( JSON . stringify ( { log : `restoreSingleLayerBy` , id } ) )
205+ const path = this . genSingleLayerStorePath ( id )
206+ const key = await this . recoverSingleLayerKey ( id )
207+
208+ core . debug ( JSON . stringify ( { log : `restoreSingleLayerBy` , id, path, key } ) )
205209
206- const result = await cache . restoreCache ( [ this . genSingleLayerStorePath ( id ) ] , await this . recoverSingleLayerKey ( id ) )
210+ const result = await cache . restoreCache ( [ path ] , key )
207211
208212 if ( result == null ) {
209213 throw new Error ( `${ LayerCache . ERROR_LAYER_CACHE_NOT_FOUND_STR } : ${ JSON . stringify ( { id } ) } ` )
0 commit comments