Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #12955, comment 68


Ignore:
Timestamp:
03/28/2018 01:13:02 AM (7 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12955, comment 68

    initial v1  
    11@MikeSchinkel - Isn't that simply sidestepping the issue? We can already wrap queries with our own functions to return custom objects rather than posts in half the code it would take to do it your way if I got the example codes relation to your proposal. I may have completely misunderstood, in which case ignore that.
    22
    3 But I can tell you my models that extend NAMESPACE_WP_Post classes are easily cachable like any WP_Post object would be. Our internal query wrappers & object instance/__construct methods do similar automagic on loading a cached object that core does. Don't see why core couldn't simply cache a new group based on the class name passed for object return.
     3But I can tell you my models that extend NAMESPACE_WP_Post classes are easily cachable like any WP_Post object would be. Our internal query wrappers & object instance/`__construct` methods do similar automagic on loading a cached object that core does. Don't see why core couldn't simply cache a new group based on the class name passed for object return.
    44
    55