#55227 closed enhancement (fixed)
Attachments: add caching to wp_count_attachments
| Reported by: | jeherve | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.1 |
| Component: | Media | Version: | |
| Severity: | normal | Keywords: | has-patch dev-feedback needs-testing has-unit-tests needs-dev-note |
| Cc: | Focuses: | performance |
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.
4 years ago
#2
@
4 years ago
- Milestone Awaiting Review → 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.
4 years ago
This ticket was mentioned in PR #3093 on WordPress/wordpress-develop by mukeshpanchal27.
4 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
@
4 years ago
- Keywords dev-feedback needs-testing added
- Owner set to
- Status new → 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.
4 years ago
mukeshpanchal27 commented on PR #3093:
4 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
@
4 years ago
- Keywords has-unit-tests added
Hi, Added unit test for the wp_count_attachments cache
4 years ago
#12
Committed in https://core.trac.wordpress.org/changeset/54255
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Add caching to wp_count_attachments