Questions tagged [cache]

A cache is a component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere.

179 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
660 views

Website not updating - no cache plugins active!

I've a problem with my WordPress website getting updated after I make changes to its code: I'm using phpStorm with auto-save, running the website on WAMP, locally. Therefore, right after I right new ...
3
votes
0answers
338 views

Cache issues with redis and nginx

I have a problem with the rewrite rules in my nginx config file. I am running wordpress with nginx and redis to cache the site. I can get the redis to cache all pages not a problem, but as I am ...
2
votes
0answers
544 views

Full page NGINX (or Cloudflare) caching and WordPress nonces

Goal: I want to cache the full WordPress response via NGINX and exclusively use the REST API for the user specific parts. Issue: I can't get an authenticated nonce to use against the API. My plan ...
2
votes
0answers
35 views

Automatically enabled caching in some hosting companies w/o visible plugin (Must use plugin)

Suddenly WP customizer can't show the Lve color change w/o actually saving and then going back to the live website. Please see this image there is no third party cache plugin activated: Caching on ...
2
votes
0answers
1k views

Database Cache and Object Cache Difference?

I am a bit confused here. Is there a difference between object and database caching ? I am planning to only do object caching for my site. Does object caching include database caching ?
2
votes
1answer
395 views

Register script version not showing

I want to implement cache busting on a specific script, but the version is not added to the url as query vars. Here is the code I'm using : wp_register_script( 'custom', ...
2
votes
0answers
1k views

How to remove duplicate query on page load or make them cacheable

I'm having the same issue as Lletnek where there are the same duplicate queries for get_page_by_path on some of the pages on our website. I have got the queries down to 2/3 on most pages using ...
2
votes
0answers
385 views

How can I use fragment caching to exclude certain plugins from being cached?

I'm using the popular W3TC to optimize load times. The website that I run is dynamic and has login widgets as well as status indicators for game servers. The widgets are not hard-coded into the ...
2
votes
0answers
1k views

Run oembed separately outside the_content()

I have this structure for my content.php : <div class="featured"> <!--featured image here--> </div> <h1 class="entry-title">Post Title</h1> <div class="entry-...
2
votes
1answer
443 views

W3 Total Cache plugin integration

I am working on a plugin (widget) that is using some transients that are updated from time to time. That said, when these transients are updated, I think I will need to flush the cache to display the ...
1
vote
0answers
30 views

How can I cache the LearnDash quizzes on my server?

I'm using the WP LearnDash module for providing my courses. I see sudden horrible lags particularly when using the quizzes. Most of the time they load in a couple of seconds. However, sometimes it can ...
1
vote
0answers
760 views

How to totally disable cache in Wordpress?

I have a plugin that somehow seems to be caching even though I have disabled cache in Firefox per these instructions: https://support.mozilla.org/en-US/questions/1232148 I have also tried browsing ...
1
vote
0answers
47 views

How can I use cached images in an AJAX response?

WP_AJAX includes no-cache headers with its responses. I'm using Ajax to fetch part of a shopping cart, which includes little image thumbnails. On each Ajax request, these are replaced and we can see ...
1
vote
1answer
202 views

Disable feed cache for custom RSS feed?

I created my custom RSS feed using the following code: add_action( 'init', 'MyCustomRSS' ); function MyCustomRSS(){ add_feed( 'examplecomrss', 'MyCustomFeedCallback' ); } /* This code seeks the ...
1
vote
0answers
473 views

How do I enable dynamic content in a theme cached with WP Super Cache?

I've been trying to improve my caching strategies in the themes I build, but I'm having trouble understanding how "Enable dynamic caching" works in WP Super Cache. There's very little information on ...
1
vote
0answers
11 views

How to cache a different page version based on HTTP header?

My website has an HTTP response header generated by Cloudflare that contain the visitor country code, and i can use that header in PHP to generate a dynamic content based on the visitor country, now i'...
1
vote
1answer
153 views

Assign Json file to WP_Query

I am working with an unnecessarily complex theme with very limited time. Because of the number of records we have, load time is unbearably slow therefore we are looking to caching records using json ...
1
vote
0answers
198 views

Preload Cache for thousands of posts may be on non-production environment

I have a setup of three wordpress environments: Local: My Development machine (using docker) Staging: An AWS Free Tier EC2 machine Production: An AWS Free Tier EC2 machine I use git/git-hooks to ...
1
vote
1answer
368 views

How can I render shortcode so that its not cached by Caching plugins?

I am developing a plugin and I don't want the output of my shortcode to be cached by popular WordPress caching plugins like W3Ttoalcahe, WPSuperCache, etc. Is there any way I can achieve that or ask ...
1
vote
0answers
75 views

create link/button to purge cloudflare cache on post

good day , how to create a button on post so that visitors can purge it own post cache on cloudflare ? i found this bash script and use to manually flush single url #!/bin/bash if [ -z "$1" ]; then ...
1
vote
0answers
233 views

Passing UTM Parameters To Modify Page In Wordpress

I'm trying to modify the way my WordPress template displays content depending on the URL parameters. The first stage is to catch variables and store them for subsequent pageviews so that the user has ...
1
vote
0answers
174 views

WP_Object_Cache for heavy WP_Query

I am wondering what is the best way to cache a Wp_Query that can have from 10 items to 10000. I know it's a bad practice but for specific reason I have to process all this post types all together and ...
1
vote
0answers
47 views

Is using custom table to suit business needs instead of transients a big hit to page load speed?

I am working on changing the caching strategy to save the response of an API(which refreshes data in every 30 minutes). Among other things, I came across transients and their unreliable nature of ...
1
vote
1answer
509 views

Cache Busting using htaccess Rewrite rule?

I am trying to follow this tutorial that says i can make a server to send a file like style.css if the requested file is style.15458888.css with a rewrite rule to be put inside the htaccess file. ...
1
vote
1answer
141 views

Wordpress & Fastcgi proper setup?

I'm trying to setup my sites to run with fastcgi_cache and found it a bit problematic that it doesnt really refresh content when something new is added to my site/webshop. So i stumbled upon the ...
1
vote
0answers
16 views

Published site reverts without changes to theme

I recently added a search bar to our website by adding a plugin and adding that plugin into the appropriate place in our theme. I also added an event listener as an attribute on an element in another ...
1
vote
0answers
46 views

Should wp_query automatic meta and term cache priming be used in an enviroment with an object caching

This is kind of followup question to Explanation of update_post_(meta/term)_cache which discusses the disabling of automatic meta and term caches by setting to false both update_post_meta_cache and ...
1
vote
0answers
194 views

Wordpress Leverage browser caching Show how to fix & Eliminate render-blocking JavaScript and CSS in above-the-fold content Show how to fix

Good afternoon , as the title says I have the following problems that I tried and cannot find a solution for , I already tried the different solutions people posted here in different topics . So ...
1
vote
0answers
42 views

SuperCache for Custom Templates

I've started creating custom templates. For instance, I wanted a news template for posts that are news oriented. So, I made news.php <?php /* * Template Name: News Article * Template Post Type: ...
1
vote
0answers
266 views

Cache wp-json/posts without a plugin?

Is there a way to cache the following url on my site without using a plugin? www.domain.com/wp-json/posts?type=custom_post_type&filter%5Bposts_per_page%5D=5&filter%5Btaxonomy%5D=events_cat ...
1
vote
0answers
30 views

WordPress returns to an old version

I'm creating a WordPress site and today it has returned to an old version of himself. I don't mean a downgrade, but it has changed the slider, menu's links, widgets, etc to as it was weeks ago. How ...
1
vote
0answers
225 views

Losing preview ability: W3 Total Cache + Post name permalinks

I've been seeing issues on sites when I enable W3 Total Cache (Using an aws cdn) where the ability to preview pages would be lost. I was just able to confirm this when enabling it on a new site. A ...
1
vote
0answers
13 views

Static page determines as home, but it is not

I've registered post type with slug services, which means that all content will be under example.com/services. Than I decided to remove it, so I deleted this code from functions.php. Now when I ...
1
vote
0answers
351 views

Running code before object-cache.php runs

I want to polyfill some functions before object-cache.php runs. I have PHP7 and APCu installed. However, W3 Total Cache is using apc_* functions, not apcu_* functions. W3 Total Cache's object cache ...
1
vote
1answer
18 views

cache specific data?

I want to display some information from database in each post, for example date of registration of user and user role etc. It is quite static data that doesn't change. Now if I make a query to the ...
1
vote
0answers
38 views

Server stressed by /feed

I'm debugging a website that my friend has hosted on a VPS that should be perfectly capable of handling a Wordpress installation that gets ~2m monthly visitors. During the last few months, his uptime ...
1
vote
0answers
3k views

Google PageSpeed Enable Compression isn't working?

I am trying to improve pagespeed of my website. When I test my site it tells "Compressing https://z-1-static.xx.fbcdn.net/rsrc.php/v2/yF/r/SQ7jeOqw5xW.js could save 188.3KiB (70% reduction)." I have ...
1
vote
0answers
2k views

How to decode wordpress transient cache stored in database?

Wordpress stores caches using Transient and saved in wp_options table. I can't read those stored values - a sample snapshot is as below. If you know how to decode/read/parse them, please share.
1
vote
1answer
385 views

Hook an action when a transient is deleted ? Can't get it to work!

I'm working on a plugin, and it caches a remote page when requested. The file is created with tempnam(). I save the path of that cached file in a transient, using the transient API. Once the ...
1
vote
0answers
2k views

Flush RSS Cache

I'm editing my RSS feed by adding extra elements containing custom fields I've created. I'm aware these won't work on standard RSS readers, but I've building a custom page for a different website that ...
1
vote
1answer
228 views

How to prevent/delay MySQL connections when an object cache is used?

We are using an object cache backed by memcached, however I think that WordPress will still connect to MySQL on every page load, which shouldn't be needed if all queries can be handled by the object ...
1
vote
0answers
871 views

Wordpress PHP 5.5 and OPcache

I have tried to run on my Apache 2.4 and PHP 5.5 OPcache. My admins turned it on for me but the site was not faster - it was slower. Is there a how-to somewhere or a code snipet needed in WordPress ...
1
vote
0answers
196 views

Index page and random posts needs a forced refresh in order to show new content

I have this weird problem with both on desktop and mobile, which requires a manual refresh in order for the index-page to show new posts. It also appears as if the user is not logged in. Basically, I ...
1
vote
0answers
81 views

wp_options flooded with transient API entires

I make heavy use of the WordPress Transient API. Suddenly a few days ago my wp_options table began being flooded with transient entries (2GB worth on average). Normally WordPress only writes them to ...
1
vote
0answers
1k views

How to handle cookies from a WordPress plugin on a cached page?

I'm attempting to write a plugin that can work with cookies on a WordPress site that uses page caching (why?). I've been following this tutorial on Esanctuary.net. I'm trying to write to the ...
1
vote
1answer
1k views

Some custom taxonomy child terms not showing in admin. Caching problem?

I have a problem with some custom taxonomy terms. I am using "Types" plugin for creating custom post types and custom taxonomies. I successfully created my postype and hierarchical taxonomy and ...
1
vote
0answers
1k views

w3 total cache and sitemap.xml

I have been installing lately w3 total cache on my wordpress site and today webmaster tools has been mailing an error by sitemap.xml crawling. Sitemap ist HTML. Is anybody experienced this issue with ...
1
vote
0answers
245 views

After having installed APC Object Cache Backend transients stopped working

My understanding is that once you enable the persistent object cache, your transients are no longer stored in wp_options but in the cache. Once I installed Mark Jaquith's APC Object Cache Backend, ...
1
vote
0answers
47 views

Caching RSS plugin data

I'm developing plugin and I need it's data to be cached, let's assume that it's large RSS feed grabber. Basically data of one RSS feed is about 100 lines of parsed HTML code (about 2KB). On one page ...
1
vote
0answers
242 views

Adding (image) caching to my Tumblr widget

I've hacked together a simple plugin to show the latest image from a Tumblr blog. To avoid upsetting the Tumblr API (v1), I want to cache that image within Wordpress... I think perhaps I can do this ...