[wp-trac] [WordPress Trac] #31094: Attempt to cache notoptions in database to save queries for non-existent options

WordPress Trac noreply at wordpress.org
Wed Jan 21 23:23:19 UTC 2015


#31094: Attempt to cache notoptions in database to save queries for non-existent
options
-------------------------+-----------------------------
 Reporter:  ashfame      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Cache API    |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Coming from #31061, @boone suggested this might be worth exploring, so I
 took a first pass at it.

 Idea is to save nonexistent options in options table as
 `notoptions_cache`. This seems to be working nicely so far. Non existent
 queries get cached, and gets refreshed when they are added or updated.

 I am considering the following moving forward:

 1) Upon `delete_option()` call, we can add that option to
 `notoptions_cache` right away but I can imagine cases where we wouldn't
 want that, so I believe letting it get added on `get_option()` is a better
 choice
 2) Implement it for Multisite functions - Should we? Chances are anyone
 who is running a multisite is already using a persistent object cache
 backend. Thoughts?
 3) If `object-cache.php` is dropped in, so `notoptions` cache is now
 maintained over there persistently, all good. But when its moved out, it
 will try to use the `notoptions_cache` inside option table which may not
 be accurate anymore, so we need to delete it the moment a persistent
 object cache backend gets involved.

 Thoughts? Anything else I should consider?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31094>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list