Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#36535 closed feature request (wontfix)

Action after cache flush

Reported by: unyson's profile Unyson Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Cache API Keywords:
Focuses: performance Cc:

Description

Please add an action here so we can also flush our custom cache

Change History (3)

#1 @dd32
9 years ago

Adding an action here wouldn't be advised.

The object cache is designed to be replaced entirely by drop-ins (wp-content/object-cache.php), so you wouldn't be able to rely upon the action actually being fired when someone was using an Object Cache.

Do you have a reference for how this Cache API you've linked to actually works?

#2 @Unyson
9 years ago

Do you have a reference for how this Cache API you've linked to actually works?

Usage example is in class comment.

Main features:

  • Throws if cache key not found
  • Easy access nested keys by "multikey" format: a/b/c is equivalent to $cache['a']['b']['c']
  • Auto flush is executed "regularly" to prevent php memory full. Cache array keys are deleted one by one until php memory has 10Mb free

#3 @dd32
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

It sounds like this should be using some kind of Object Cache dropin in conjunction with your custom handlers, I don't think I see any valid reasoning for adding hooks here.

Note: See TracTickets for help on using tickets.