Tag Info

New answers tagged

0

Transients are generally cleared when read. If you want to check for this common case, you could catch the pre_transient_transientname and see if it expired, the same way WP is doing: function get_transient( $transient ) { /** * Filter the value of an existing transient. * * The dynamic portion of the hook name, `$transient`, refers to ...


0

Simplest way to see what is causing it is to disable all plugins and add them back one at a time. If that doesn't reveal it, switch to a default theme. After that I'd say it is something server side. To answer your question though - caching should help but it depends on what is causing the high usage.


0

Using the wp_cache_delete() technic showcased by toscho, you also have to make sure your option is not on autoload. If your option is autoloaded, it'll be part of the alloptions cache so you won't be able to clear it individually. So make sure to use the following format when you set/update your option if you want to be able to clear it from the cache: ...



Top 50 recent answers are included