Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#35610 closed enhancement (fixed)

clean_comment_cache needs a hook

Reported by: spacedmonkey's profile spacedmonkey Owned by: ericlewis's profile ericlewis
Milestone: 4.5 Priority: normal
Severity: normal Version: 2.3
Component: Cache API Keywords:
Focuses: Cc:

Description

Unlike other cache clear functions, clean_comment_cache doesn't have a hook.

Attachments (3)

35610.patch (845 bytes) - added by spacedmonkey 9 years ago.
35610.1.patch (837 bytes) - added by spacedmonkey 9 years ago.
35610.2.patch (832 bytes) - added by spacedmonkey 9 years ago.
Third time's the charm

Download all attachments as: .zip

Change History (11)

@spacedmonkey
9 years ago

#1 follow-up: @ericlewis
9 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version set to 2.3

Makes sense to me.

Do we want unit tests for this?

#2 @rachelbaker
9 years ago

@spacedmonkey Looks like there is some copypasta in the hook docs

Fires once after each taxonomy's term cache has been cleaned.

@spacedmonkey
9 years ago

Third time's the charm

#3 @spacedmonkey
9 years ago

I don't think this requires unit tests no. Nice spot, @rachelbaker

#4 @ericlewis
9 years ago

  • Milestone changed from Future Release to 4.5

#5 in reply to: ↑ 1 @boonebgorges
9 years ago

  • Owner set to ericlewis
  • Status changed from new to assigned

Replying to ericlewis:

Makes sense to me.

Do we want unit tests for this?

Don't need unit tests for an action in most cases.

35610.2.patch should have extraneous spaces in new @param documentation removed, and I don't think we need a function-level @since addition for this (the info is in the hook docblock).

#6 @ericlewis
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 36405:

Comments: Fire an action after a comment is removed from object cache.

When a comment is removed from the object cache, the clean_comment_cache action is now fired. This provides plugin and theme developers a chance to perform secondary cache invalidation as needed.

Props spacedmonkey.
Fixes #35610.

#7 @ericlewis
9 years ago

  • Keywords has-patch removed

#8 @DrewAPicture
9 years ago

In 36922:

Docs: Improve the DocBlock summary for the clean_comment_cache action, introduced in [36405].

See #35610. See #35986.

Note: See TracTickets for help on using tickets.