Changes between Initial Version and Version 1 of Ticket #28425, comment 10
- Timestamp:
- 06/24/2014 04:32:20 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28425, comment 10
initial v1 6 6 The additional db query can avoided by just using the available objects instead of the ID. I think the change is pretty simple and makes sense, it actually saves some CPU. There is no reason for throwing away the object and passing the ID just to get the object from the cache again. 7 7 8 Actually, the get_instance method of WP_Post (which is called by get_post if you ronly use the ID) will even create a new WP_Post object every time it is read from the cache, since the cache contains the raw data and not the WP_Post object.8 Actually, the get_instance method of WP_Post (which is called by get_post if you only use the ID) will even create a new WP_Post object every time it is read from the cache, since the cache contains the raw data and not the WP_Post object.