[wp-trac] [WordPress Trac] #56198: Check cache key type

WordPress Trac noreply at wordpress.org
Thu Aug 4 17:31:59 UTC 2022


#56198: Check cache key type
--------------------------------------+-----------------------------
 Reporter:  tillkruess                |       Owner:  SergeyBiryukov
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  6.1
Component:  Cache API                 |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In [changeset:"53834" 53834]:
 {{{
 #!CommitTicketReference repository="" revision="53834"
 Tests: Add more test cases for `WP_Object_Cache::is_valid_key()`.

 A valid cache key for `wp_cache_*()` functions must be either an integer
 number or a non-empty string. To avoid potential compatibility issues or
 key collisions, a string that becomes empty after `trim()` should not be
 considered a valid cache key.

 Follow-up to [53818], [53821], [53822].

 Props tillkruess.
 See #56198.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56198#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list