WordPress.org

Ready to get started?Download WordPress

Forums

Cache details and category sql (1 post)

  1. drumdance
    Member
    Posted 8 years ago #

    Hi All,

    I have a blog that has over 100 categories. This can generate intense database traffic on the first page load of the site because WP generates a ton of subqueries to flesh out the category children. Two ideas to consider:

    First, the function return_categories_list() in admin-functions.php currently has an arbitray LIMIT clause of 100, so not all categories show up in the posting interface. I don't see a compelling reason to impose this limit, so maybe it can be removed in future versions?

    Second, since categories don't change very often, perhaps the cache could be extended to have a longer-lasting, cross-user (that is, not tied to individual users) cache for category queries. The cache would be deleted whenever categories are inserted/updated/deleted in the admin interface.

    The first one is a trivial change. The second requires more thought and I've thought about doing it myself, but I don't want to fork and/or run over someone else's work.

Topic Closed

This topic has been closed to new replies.

About this Topic