Opened 4 months ago
Last modified 2 months ago
#61343 new enhancement
Improve caching in get_calendar function
Reported by: | spacedmonkey | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | good-first-bug has-patch |
Focuses: | performance | Cc: |
Description
The get_calendar
function is used to generate the calendar. There are a number of things that can be done to improve the performance of this function.
- Replace the raw query to posts table with call to WP_Query query class.
- Change cache invalidation from
add_action( 'save_post', 'delete_get_calendar_cache' ); add_action( 'delete_post', 'delete_get_calendar_cache' );
to
add_action( 'clean_post_cache', 'delete_get_calendar_cache' );
- Instead of store all caches in a simple cache key, break them up and invalidate caches in another way.
Change History (5)
This ticket was mentioned in PR #6708 on WordPress/wordpress-develop by @narenin.
4 months ago
#1
- Keywords has-patch added
This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.
2 months ago
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/61343