Using a wildcard with delete_transient()
Forgot I could go this route: $wpdb->query( “DELETE FROM `$wpdb->options` WHERE `option_name` LIKE (‘_transient_galleries_%’)” );
Forgot I could go this route: $wpdb->query( “DELETE FROM `$wpdb->options` WHERE `option_name` LIKE (‘_transient_galleries_%’)” );
Yes, social counts are a great use case for using transients. Aside from the slow page loading, as you mentioned, this will also help prevent you from blowing through API limits if the external requests are being made on every page load. Let’s say you have it set to cache for 30 minutes and the … Read more
An advanced object cache is a cache mechanism that can store data that persists beyond a single request. A couple of popular object caches for WordPress are APC and Memcached. The WP_Object_Cache class Codex page has a list of links with more info on advanced cache options.
Easiest way to do this was to define a constant programmatically: // Tell WP Super Cache & W3 Total Cache to not cache WPReadable requests define( ‘DONOTCACHEPAGE’, true );
Have you looked at WP_Object_Cache? If you suspect there is unwanted caching happening in the code that generates the admin panel then you might be able to use functions from the WP_Object_Cache to clear it. WP_Object_Cache is WordPress’ class for caching data which may be computationally expensive to regenerate, such as the result of complex … Read more
How to trigger an oembed cache regeneration The default cache time is 24 hours and we can adjust it with the oembed_ttl filter. But as you’ve noticed, expired cache is not enough to trigger a cache regeneration. The reason is this line in the WP_Embed class: if ( $this->usecache || $cached_recently ) { so to … Read more
Hm, I am not sure but I think that whole cache should be invalidated on publishing of new post… Had you tried to enable debug info in W3TC and check why are those pages aren’t refreshed? As for manual cache clear, from plugin’s FAQ: How can I flush the cache without using the WP Admin … Read more
U could try using this type function: add_action( ‘wp_print_scripts’, ‘my_deregister_javascript’, 100 ); if ( !is_page(‘Events’) ) { wp_deregister_script( ‘wpng-calendar’ ); wp_deregister_script( ‘date-js’ ); wp_deregister_script( ‘thickbox-js’ ); wp_deregister_script( ‘jquery-js’ ); wp_deregister_script( ‘wiky-js’ ); } } Found it on this website U’ll have to modify the nandlers to your needs, i found the W3TC handlers to be: … Read more
I know this question is ancient, but no, it’s not very secure. Anyone with knowledge of the AJAX endpoint would be able to generate valid nonces, which defeats the purpose in the first place. That being said, nonces are a low level defence in the first place: they only stop the simplest of attacks. A … Read more
It’s hard to answer this given that each site is most likely different and each server is also configured differently. If these sites are individual WordPress installs then 1GB /30 sites is normal, an absolute bare minimum per site would be 32MB for apc.shm_size, this equals 960MB with no overhead. 32MB is in my opinion … Read more