Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 7 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:
PR Number:


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)

#1 @scribu
8 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.

#3 @duck_
8 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

#4 @mikeschinkel
7 years ago

  • Cc mikeschinkel@… added

Maybe an update to the parameter comment to explain this?

Note: See TracTickets for help on using tickets.