File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212class Deployer {
1313
14+ const DEFAULT_NAMESPACE = 'wp2static-addon-s3/default ' ;
15+
1416 // prepare deploy, if modifies URL structure, should be an action
1517 // $this->prepareDeploy();
1618
@@ -24,6 +26,8 @@ public function upload_files( string $processed_site_path ) : void {
2426 return ;
2527 }
2628
29+ $ namespace = self ::DEFAULT_NAMESPACE ;
30+
2731 // instantiate S3 client
2832 $ s3 = self ::s3_client ();
2933
@@ -58,7 +62,7 @@ public function upload_files( string $processed_site_path ) : void {
5862
5963 $ cache_key = str_replace ( $ processed_site_path , '' , $ filename );
6064
61- if ( \WP2Static \DeployCache::fileisCached ( $ cache_key ) ) {
65+ if ( \WP2Static \DeployCache::fileisCached ( $ cache_key, $ namespace ) ) {
6266 continue ;
6367 }
6468
@@ -93,7 +97,7 @@ public function upload_files( string $processed_site_path ) : void {
9397 $ result = $ s3 ->putObject ( $ put_data );
9498
9599 if ( $ result ['@metadata ' ]['statusCode ' ] === 200 ) {
96- \WP2Static \DeployCache::addFile ( $ cache_key );
100+ \WP2Static \DeployCache::addFile ( $ cache_key, $ namespace );
97101
98102 if ( $ cf_max_paths >= count ( $ cf_stale_paths ) ) {
99103 $ cf_key = $ cache_key ;
You can’t perform that action at this time.
0 commit comments