WordPress.org

Ready to get started?Download WordPress

Forums

DB Cache Reloaded Fix
Clear cache for a particular query (1 post)

  1. Josie Stauffer
    Member
    Posted 2 years ago #

    Your plugin is great for our situation, where a majority of the users will be logged-in and so cannot benefit from page caching.

    But now I'm writing my own first plugin. It generates a shortcode for insertion into a page or post. The shortcode may update a database table, and queries involving that table are cached by DB Cache Reloaded Fix.

    I have found a hacky way around the problem that works on my local installation:

    $time = time();
    $wpdb->get_results( $wpdb->prepare( "SELECT $time, my_data FROM ..... " ..

    which changes the query each time it is run.

    1. Is there a better way?
    2. Is this going to be reliable? I'm more experienced with Oracle than with MySQL, and the MySQL documentation doesn't make it clear that this syntax is acceptable.

    http://wordpress.org/extend/plugins/db-cache-reloaded-fix/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.