[wp-trac] [WordPress Trac] #23330: Allow autoloading all options, not just autoload = yes options

WordPress Trac noreply at wordpress.org
Fri Feb 1 02:00:51 UTC 2013


#23330: Allow autoloading all options, not just autoload = yes options
--------------------------+-----------------------------
 Reporter:  ryan          |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Cache         |     Version:  3.5.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------------

Comment (by rmccue):

 Replying to [comment:5 ryan]:
 > That's a good reason for not ignoring autoload by default.
 >
 > Since this can happen to autoload = yes options too, perhaps we can
 finagle a method for postponing unserialize for custom objects.

 I can see this being a little complicated, but doable. I'm actually
 storing an array of objects, so my guess is to search for `O:\d+:"\w+"`
 and check `class_exists()`, then hook in at `plugins_loaded` to
 unserialize those ones.

 I think it's a bit of overkill, and may have performance issues if we use
 regex (with a huge number of options). Possible to do with with string
 parsing (`strspn`), probably faster, but I don't think it's really
 necessary, since setting it to not autoload is an easy way to deal with
 it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23330#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list