New answers tagged cache
0
Caching plugin definitely helps as Alex already mentioned. But you will still hit a resource limit when you get a lot of visitors. There is a point you can't do much more than upgrading your hosting plan for more resources.
Consider a hosting provider such as WPEngine which automatically optimize your WordPress with caching and allows you to easily upgrade ...
2
Wordpress can be a resource hog if you don't use caching. W3 Total Cache could help you a lot with MySQL, Object and Page Caching. You should also install PHP-APC and use it with the plugin. It can do wonders.
1
You could delete an existing cache for your option before you call get_option():
$GLOBALS['wp_object_cache']->delete( 'your_option_name', 'options' );
$value = get_option( 'your_option_name' );
0
As per this question, you can use fragment caching to exclude specific things from being cached:
Edit your templates to with the following syntax to ensure that
dynamic features remain so: Example 1:
<!-- mfunc any PHP code --><!-- /mfunc -->
Example 2:
<!-- mfunc -->any PHP code<!-- /mfunc -->
Example 3:
...
0
This function will clear WP Super Cache upon saving of ACF Options page. Enjoy!
<?php
/* Additional Function to prune the Cache if $post_id is '0' or 'options' */
function f711_clear_custom_cache($post_id) {
// just execute if the $post_id has either of these Values. Skip on Autosave
if ( ( $post_id == 0 || $post_id == 'options' ) && ...
0
In Settings > WP Super Cache disable Advanced > Clear all cache files when a post or page is published or updated.
There is nothing wrong with using static page cache for larger site as long as it fits your requirements. If you need dynamic features or extreme performance, then it would be time to look into alternatives.
0
Here is the mfunc part in the 0.9.2.9 version of the W3TC plugin:
http://plugins.trac.wordpress.org/browser/w3-total-cache/tags/0.9.2.9/lib/W3/PgCache.php#L1386
where the regular expression is:
$buffer = preg_replace_callback('~<!--\s*mfunc\s*' . W3TC_DYNAMIC_SECURITY . '(.*)-->(.*)<!--\s*/mfunc\s*' . W3TC_DYNAMIC_SECURITY . '\s*-->~Uis', ...
1
This is actually incorrect / out-dated and I'll make sure our compliance team update our AUP asap. We do allow caching modules that benefit both the blogger and the server it resides on.
2
The point of caching is to increase performance, not specifically to reduce server load, but there is pretty obviously a relationship-- perhaps not exactly the one(s) you expect.
This is by no means a canonical answer but here are several things I can think of:
Some kinds of caching increases memory usage.
Caching that uses mem_cache, for example, ...
1
Figured it out. Looking at wp-comments-post.php there is a filter called comment_post_redirect which I used to check if the comment was approved and then added a query string to the URL. So easy.
//A query string needs to be added when redirecting back to the post after a comment is posted and not approved. This ensures the page with the "Your comment is ...
1
Let me quote what's mentioned in the official FAQ of WordPress.com Stats plugin (JetPack statistics module uses this plugin as the base)...
The plugin collects stats via a javascript call, so as long as the JS call is on the page stats will be collected just fine, whether the page is cached or not.
In short, you don't have to worry about JetPack stats. ...
Top 50 recent answers are included