#55227 closed enhancement (fixed)
Attachments: add caching to wp_count_attachments
Reported by: | jeherve | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch dev-feedback needs-testing has-unit-tests needs-dev-note |
Focuses: | performance | Cc: |
Description
I noticed that while wp_count_posts
includes some caching, {{{wp_count_attachments}} does not. Would it make sense to add the same caching system there?
Attachments (1)
Change History (15)
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 years ago
#2
@
2 years ago
- Milestone changed from Awaiting Review to 6.1
This came up in the last media meeting and was thought to be a good candidate for 6.1
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 years ago
This ticket was mentioned in PR #3093 on WordPress/wordpress-develop by mukeshpanchal27.
2 years ago
#4
The PR refresh the patch ageist the trunk and remove function _count_attachments_cache_key
function as it was called only one time in wp_count_attachments()
.
Trac ticket: https://core.trac.wordpress.org/ticket/55227
#5
@
2 years ago
- Keywords dev-feedback needs-testing added
- Owner set to joedolson
- Status changed from new to assigned
Hi there!
As we are nearing the release cycle of 6.1.0
let's wrap this ticket so it will merge into the core for this version. I don't find any blocker for this. @jeherve feel free to test the PR and share your feedback.
Assign to @joedolson as per last meeting. Is this ticket on your radar?
This ticket was mentioned in Slack in #core-media by mukeshpanchal27. View the logs.
2 years ago
mukeshpanchal27 commented on PR #3093:
2 years ago
#7
Thank you for the feedback, @costdev I have updated the code with a single apply_filters( 'wp_count_attachments' )
.
Ping @antpb Media component maintainer for the review.
#8
@
2 years ago
- Keywords has-unit-tests added
Hi, Added unit test for the wp_count_attachments
cache
#10
@
2 years ago
- Owner changed from joedolson to audrasjb
- Status changed from assigned to reviewing
Re-assigning for final review.
2 years ago
#12
Committed in https://core.trac.wordpress.org/changeset/54255
Add caching to wp_count_attachments