Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#36535 closed feature request (wontfix)

Action after cache flush

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

Description

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

Change History (3)

#1 @dd32
10 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
10 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
10 years ago

  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

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.