diff --git a/includes/classes/DistributorPost.php b/includes/classes/DistributorPost.php index 96e965704..1db784c82 100644 --- a/includes/classes/DistributorPost.php +++ b/includes/classes/DistributorPost.php @@ -666,7 +666,9 @@ protected function parse_media_blocks() { $found = false; // Note: changes to the cache key or group should be reflected in `includes/settings.php` - $media = wp_cache_get( 'dt_media::{$post_id}', 'dt::post', false, $found ); + $cache_key = "dt_media::{$this->post->ID}"; + $cache_group = 'dt::post'; + $media = wp_cache_get( $cache_key, $cache_group, false, $found ); if ( ! $found ) { // Parse blocks to determine attached media. @@ -679,7 +681,7 @@ protected function parse_media_blocks() { } // Only the IDs are cached to keep the cache size down. - wp_cache_set( 'dt_media::{$post_id}', $media, 'dt::post' ); + wp_cache_set( $cache_key, $media, $cache_group ); } /*