Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #59516, comment 10


Ignore:
Timestamp:
10/24/2023 02:12:39 PM (2 years ago)
Author:
thekt12
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59516, comment 10

    v3 v4  
    4040**Step 1: Standardize code**
    4141Standardize WP_Network_Query, WP_Site_Query, WP_Comment_Query to use generate_cache_key function the same way WP_Query does.
    42 Note: There is one performance downgrade here. The way caching is implemented in all 3 class above it skips the request generation part entirely if cache is present. However, the upside it the query will be cached based on the final request making it better at handling similar queries generated via different args setup.
     42Note: There is one performance downgrade here. The way caching is implemented in all 3 class above it skips the request generation part entirely if cache is present.
     43However, the upside of implementing these change is, cache will be based on the final request making it better at handling similar queries generated via different args setup.
    4344For e.g Caching in WP_Network_Query skips [https://github.com/WordPress/wordpress-develop/blob/781953641607c4d5b0743a6924af0e820fd54871/src/wp-includes/class-wp-network-query.php#L256  $network_ids = $this->get_network_ids();] which is logic intensive.
    4445