Changeset 8904 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php
- Timestamp:
- 06/03/2019 02:50:54 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php
r8901 r8904 223 223 public function search( $es_args ) { 224 224 $service_url = 'https://public-api.wordpress.com/rest/v1/sites/' . $this->jetpack_blog_id . '/search'; 225 $json_es_args = json_encode( $es_args );225 $json_es_args = wp_json_encode( $es_args ); 226 226 $cache_key = md5( $json_es_args ); 227 227 $lock_key = 'lock-' . $cache_key; 228 228 $count_key = 'count-' . $cache_key; 229 229 230 // If the Query args were not able to be encoded, bail. 231 if ( ! $json_es_args ) { 232 return false; 233 } 234 230 235 $response = wp_cache_get( $cache_key, self::CACHE_GROUP ); 231 232 236 233 237 // Use a temporary lock to prevent cache stampedes.
Note: See TracChangeset
for help on using the changeset viewer.