• I’m revamping a plugin I wrote some time ago and have encountered an odd behavior with update_option().

    The plugin uses a handful of options. Within a single function, a couple options get updated successfully. When it comes to the third option, it fails to update. (Actually, it fails to create the option, since the option doesn’t exist yet when the function starts running.)

    Here’s the weird part: On my next page load, WP acts like the option was saved. get_option() returns what it should, even though the option doesn’t show up in phpMyAdmin.

    But a couple page loads later, it’s gone.

    I’m guessing that WP is caching the option (even though it’s not going into the DB). Any suggestions?

    EDIT: Also, any ideas about what might be keeping the option from being created? The DB isn’t being lost. It’s a single-dimensional assoc. array I’m trying to write to the DB.

Viewing 1 replies (of 1 total)
  • Thread Starter Adam Brown

    (@adamrbrown)

    Oddly enough, the problem went away on its own. I replicated it several times, but can’t any more. Yippee.

    Good thing, too, since I see that several of the experienced forumites have been through the posts in the past couple hours since I posted my question and apparently none have had any suggestions…

Viewing 1 replies (of 1 total)
  • The topic ‘update_option – odd caching thing’ is closed to new replies.