[wp-trac] [WordPress Trac] #43112: set_transient uses object-cache as storage instead of cache layer

WordPress Trac noreply at wordpress.org
Wed Jan 17 15:45:23 UTC 2018


#43112: set_transient uses object-cache as storage instead of cache layer
-------------------------+-----------------------------
 Reporter:  batooo       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Cache API    |    Version:  4.9.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 set_transient() function is using object-cache as storage instead as
 caching layer.
 Using APCu as an object-cache which is a PHP in-process storage leads to
 high CPU and very slow loading time. PHP processes have a lifetime and
 also can be restarted by many factors e.g server reload, PHP upgrade, ini
 change. Each time PHP process is restarted, APCu storage is empty.



 High CPU use case:
 Because transient storage will be empty on PHP restart, the site needs to
 recalculate many operations each time PHP process is restarted.

 Very slow loading time use case:
 All external API requests like "WordPress auto update checks" will be
 executed every time PHP is restarted.
 I have a site with fast velocity minify & alidropship plugins and because
 those plugins use HTTP API + add the WordPress checks, sometimes even
 leads to server-timeout.


 Object-cache as its name should be used for caching not as storage.

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


More information about the wp-trac mailing list