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

WordPress Trac noreply at wordpress.org
Thu Aug 4 12:35:55 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    |     Focuses:  performance
-------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In [changeset:"53822" 53822]:
 {{{
 #!CommitTicketReference repository="" revision="53822"
 Tests: Add a test case with a float value 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, float values should not be considered a valid cache key.

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

 Props tillkruess, malthert, spacedmonkey.
 See #56198.
 }}}

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


More information about the wp-trac mailing list