We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b097d00 commit 235d84bCopy full SHA for 235d84b
1 file changed
src/wp-includes/collaboration/class-wp-sync-post-meta-storage.php
@@ -124,7 +124,13 @@ static function ( $update ): bool {
124
}
125
126
public function get_awareness_cache_key( $post_id ) {
127
- return self::AWARENESS_TRANSIENT_PREFIX . '_' . $post_id;
+ $cache_key = self::AWARENESS_TRANSIENT_PREFIX . '_' . $post_id;
128
+ if ( strlen( $cache_key ) <= 172 ) {
129
+ // Safe length for a transient key.
130
+ return $cache_key;
131
+ }
132
+ // If the cache key is too long, hash it to ensure it fits within limits.
133
+ return md5( $cache_key );
134
135
136
/**
0 commit comments