Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#35610 closed enhancement (fixed)

clean_comment_cache needs a hook

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

Description

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

Attachments (3)

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

Download all attachments as: .zip

Change History (11)

@spacedmonkey
11 years ago

#1 follow-up: @ericlewis
11 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review → Future Release
  • Version → 2.3

Makes sense to me.

Do we want unit tests for this?

#2 @rachelbaker
11 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
11 years ago

Third time's the charm

#3 @spacedmonkey
11 years ago

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

#4 @ericlewis
11 years ago

  • Milestone Future Release → 4.5

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

  • Owner set to ericlewis
  • Status new → 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
11 years ago

  • Resolution → fixed
  • Status assigned → 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
11 years ago

  • Keywords has-patch removed

#8 @DrewAPicture
11 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.