Skip to content

Commit a8fa649

Browse files
committed
Cache processedSitePath lookup
Otherwise this happens many times.
1 parent 9d15a3c commit a8fa649

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ProcessedSite.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@
1313

1414
class ProcessedSite {
1515

16+
private static string $processed_site_path;
17+
1618
public static function getPath(): string {
17-
return SiteInfo::getPath( 'uploads' ) .
18-
CoreOptions::getValue( 'processedSitePath' );
19+
if ( ! isset( self::$processed_site_path ) ) {
20+
self::$processed_site_path =
21+
CoreOptions::getValue( 'processedSitePath' );
22+
}
23+
24+
return SiteInfo::getPath( 'uploads' ) . self::$processed_site_path;
1925
}
2026

2127
/**

0 commit comments

Comments
 (0)