WordPress.org

Make WordPress Core

Opened 16 months ago

Closed 15 months ago

Last modified 11 months ago

#23058 closed defect (bug) (fixed)

Corrected inline docs for cache.php

Reported by: ocean90 Owned by: SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: normal Version: 2.5
Component: Inline Docs Keywords: has-patch commit needs-codex
Focuses: Cc:

Description

See [6543].

There are some copy&paste issues.

Attachments (2)

23058.patch (1.4 KB) - added by ocean90 16 months ago.
23058.2.patch (1.6 KB) - added by ocean90 16 months ago.

Download all attachments as: .zip

Change History (10)

ocean9016 months ago

comment:1 ocean9016 months ago

  • Component changed from Cache to Inline Docs

comment:2 SergeyBiryukov16 months ago

I guess the comment for wp_cache_set() should be "Always returns true", like the one for WP_Object_Cache::set():
http://core.trac.wordpress.org/browser/tags/3.5/wp-includes/cache.php#L560

Same as for wp_cache_flush() and WP_Object_Cache::flush():
http://core.trac.wordpress.org/browser/tags/3.5/wp-includes/cache.php#L88

comment:3 follow-up: ocean9016 months ago

For the build in WP_Object_Cache, yes. But other implementations should be able to return false too. For example memcache::set.

comment:4 in reply to: ↑ 3 ; follow-up: SergeyBiryukov16 months ago

Replying to ocean90:

But other implementations should be able to return false too. For example memcache::set.

Then wp_cache_flush() comment should probably also say "False on failure, true on success".

Last edited 16 months ago by SergeyBiryukov (previous) (diff)

ocean9016 months ago

comment:5 in reply to: ↑ 4 ocean9016 months ago

Replying to SergeyBiryukov:

Then wp_cache_flush() comment should probably also say "False on failure, true on success".

Done in 23058.2.patch.

comment:6 SergeyBiryukov16 months ago

  • Keywords commit added

comment:7 SergeyBiryukov15 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 23328:

Correct inline docs for cache.php. props ocean90. fixes #23058.

comment:8 DrewAPicture11 months ago

  • Keywords needs-codex added

See [23328] for fixes to inline docs in:

  • wp_cache_add()
  • wp_cache_flush()
  • wp_cache_replace()
  • wp_cache_set()
Note: See TracTickets for help on using tickets.