Opened 11 months ago

Closed 10 months ago

Last modified 10 months 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:
Priority: normal Milestone:
Component: Cache Version: 3.4.1
Severity: normal Keywords: dev-feedback
Cc: mikeschinkel@…

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)

  • 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.

  • 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

  • Cc mikeschinkel@… added

Maybe an update to the parameter comment to explain this?

Note: See TracTickets for help on using tickets.