14

Found this 5 minutes ago. Words can't explain my feelings...

Comments
  • 1
    that has to be troll code...
  • 3
    @erandria

    It is production code
  • 0
    @Jilano 💩
  • 2
    Haha. Thats real flash message.
  • 3
    Sums up PHP pretty well
  • 1
    Are they really using a database cache to store a message for later code execution? At least use the wp object cache instead...
  • 0
    @Magi1053 transients are written on top of the WP object cache system. The object cache defaults to database storage if I remember correctly.
  • 0
    @ojrask Object cache isn't persistent. It's just a global variable that stores data in an associative array
  • 0
    @Magi1053 I see, thanks. Then the transient system has a hook to store to wp_options in case object-cache.php is not present.
  • 0
    @ojrask transients are always stored in the database. Object cache use to be persistent but that functionality is removed in favor of persistent caching plugins
  • 0
    @Magi1053 that transient storage logic change is quite recent then, for the past decade I've been storing transients into Redis by adding a proper object-cache.php.
Add Comment