[wp-trac] [WordPress Trac] #57963: Fix add method in test suite object-cache.php

WordPress Trac noreply at wordpress.org
Tue Mar 21 15:58:29 UTC 2023


#57963: Fix add method in test suite object-cache.php
------------------------------+--------------------
 Reporter:  spacedmonkey      |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  6.3
Component:  Build/Test Tools  |    Version:  4.8
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+--------------------
 In the bundled object-cache.php the add method does not work as expected.
 The add method, does not check to see if key existing before setting it.
 Other object caches in the space do this check.

 - [https://github.com/Automattic/wp-
 memcached/blob/96f9f53043197f41f80fcc7e852712f7cbc0a8c3/object-
 cache.php#L194-L196 Example 1].
 - [https://github.com/pantheon-systems/wp-
 redis/blob/0dafdabf1538b9ecfa987ca7c0d66da7fc1686a2/object-
 cache.php#L448-L450 Example 2].
 - [https://github.com/OllieJones/sqlite-object-
 cache/blob/0be3dbf6d6e9c7d3fb958964e1d169db191eeae0/assets/drop-in/object-
 cache.php#L1193-L1195 Example 3].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57963>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list