[wp-trac] [WordPress Trac] #36723: Add caching to wp_old_slug_redirect

WordPress Trac noreply at wordpress.org
Sat Apr 30 09:45:07 UTC 2016


#36723: Add caching to wp_old_slug_redirect
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Posts, Post Types                    |  Review
 Severity:  normal                               |     Version:  2.1
 Keywords:  has-patch dev-feedback needs-unit-   |  Resolution:
  tests                                          |     Focuses:
                                                 |  performance
-------------------------------------------------+-------------------------

Comment (by dd32):

 Replying to [comment:3 spacedmonkey]:
 > Sorry @dd32 I am not sure what you mean by "fake" page.

 Sorry, it was an assumption on my part - When someone says that a function
 that has a `is_404()` check in it is running every page, it generally
 means they're running a plugin which injects a "fake" page (one that
 doesn't actually result in a proper WP_Query object being located).

 What I mean, is that the only time that query should ever be run, is in
 the case where a singular page (a non-hierarchical one at that) is
 requested and cannot be found.
 Caching the function in that case doesn't seem to be the best location for
 it - it seems like the redirect should be cached instead to me.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36723#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list