WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21178 closed defect (bug) (invalid)

The $force argument of the get() method of the WP_Object_Cache is unused.

Reported by: hel.io Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.1
Component: Cache API Keywords: dev-feedback
Focuses: Cc:

Description

The $force argument was recently added to the get method of the WP_Object_Cache class ( wp-includes/cache.php ) but isn't used inside that method.

Change History (4)

comment:1 @scribu3 years ago

  • Keywords dev-feedback added; needs-patch removed

It might not be used in WP_Object_Cache but it might be used in other implementations, such as memcache.

I suppose this confusion wouldn't exist if WP_Object_Cache was implementing an interface.

comment:3 @duck_3 years ago

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

For reference the change was [18659].

scribu is correct its use is intended for persistent cache implementations and isn't actually required by the default in-memory cache. Further confirmation from IRC: https://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2011-11-09&sort=asc#m329935

comment:4 @mikeschinkel3 years ago

  • Cc mikeschinkel@… added

Maybe an update to the parameter comment to explain this?

Note: See TracTickets for help on using tickets.