A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
30 views

Using Cloudflare caching on wordpress with front-end user logins

I use Cloudflare heavily on all my sites. On https://pokerdiy.com I use the MyListings Theme which uses an AJAX login and Woo Commerce. The user never sees the default wordpress dashboards and control ...
0
votes
3answers
45 views

WordPress localhost site always redirect to live site [closed]

I know that there is already a similar question like this. But I have already done all these suggested solution and nothing works for me. If there are caching plugins installed like W3 total cache. ...
0
votes
0answers
29 views

Execute inline javascript in wordpress after page fully loaded

I am trying to find out the time it takes to fully load a page in wordpress using javascript.My JavaScript code is inline.I am using wp_print_scripts hook but as it prints scripts in document head i ...
0
votes
0answers
15 views

Admin area is caching posts in the editor

I recently updated to WP 5.3.1 And now, when I create a new post, it mixes up with previous posts. Also, when I reload the post list index in the WP admin area, it will not display the last ...
1
vote
1answer
19 views

Execute a piece of code also when the cached version of a page is served

How can I be sure that a piece of code is executed also for the cached page of the website?
0
votes
0answers
17 views

How to reset WP plugin?

I installed a plugin a few days back and deleted it. When I installed it again, it is showing the same data entries which I previously entered in the plugin. I have cached all the data but the problem ...
1
vote
0answers
28 views

changes to widget settings not showing up in individual pages pages until they're updated [closed]

I'm using a plugin to add a widget to my sidebar. That widget has some settings that I'm still fiddling with in order to get things right... After adjusting the settings on the screen above and ...
1
vote
0answers
15 views

WP Rocket Cache Lifespan - Never clear cache? [closed]

Recently I've installed WP Rocket. Works good but even if the cache lifespan option is set to 10 hours it actually never really clear the cache and caching files are growing each day. When I clear ...
0
votes
0answers
14 views

Using cache brokes redirecting

In my .htaccess I have a rewrite rule to redirect from /index.php to /, and it works perfectly immediately after I clear cache, but doesn't work after some time (maybe page /index.php got cached). I'm ...
0
votes
1answer
39 views

WordPress transient not working with WP Engine

For some reason, when we we're on another server (Tierpoint) everything worked fine and we recently switched over to WP Engine and the transients that I was using for my module have stopped working. ...
0
votes
0answers
25 views

Nonce timing out when cache is in use

I have implemented a plugin that allows an individual to search data that is available from the plugin and receive a list of results back from that search. Searching is the only act that can be ...
0
votes
0answers
21 views

How to disable Caching of Iframe SRC caching on WP Rocket and Cloudflare

Scenario: I have a post page with iframe with a dynamic src with time limited token, example <iframe src="https://xxxxxx.com/?token=dynamic_time_limited_key"></iframe> The time limited ...
0
votes
1answer
15 views

Using Transients

I am new to the transient concept. But I am not sure about the efficient method to use it. I really liked it as it removed the duplicate queries that I had. I have set set_transient( '...
1
vote
1answer
45 views

Duplicate Queries

While using the query monitor plugin I could notice I am making a database query 4 times. I am using OPP. So I have a method that gets me a list of posts by querying the database. I have to do this 4 ...
1
vote
1answer
17 views

Cache policy not updated according to PageSpeed

I am trying to update my cache policy by adding some directives in the .htaccess file in the root of my website. Although I updated the values for javascript files to be 1 month, when using Google ...
0
votes
0answers
20 views

Updating over 1000 posts per day (cache issue)

I'm updating every day over 1000 posts in my website and every time post is updated it pops up to the front page and the assigned categories/tags. Currently i'm using w3 total cache (free) version, ...
1
vote
0answers
37 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 ...
0
votes
1answer
17 views

Clear cache when comment is added

I am using wordpress total cache, and i need to clear cache every time a comment is added or modified <?php $w3_plugin_totalcache->flush_all(); ?> i found this method but , i don't know ...
0
votes
0answers
21 views

Wordpress logout appends cache/all/index.php to the site_url()

I have a wordpress website when i try to logout using custom menu logout link and redirect to home page it appends this cache/all/index.php to the site_url() like https://www.example.com/cache/all/...
1
vote
0answers
26 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 ...
0
votes
0answers
99 views

Visited Page Still Being Cached - Cache-Control Header Not Working

So I am trying to solve an issue that has been plaguing me and I can't seem to figure out the issue. I keep running into a problem where, if a logged out visitor visits my site and views a page ...
0
votes
2answers
102 views

W3TC manual cache flush does not work

My need is to have a .php file that is located in the root folders of all WordPress websites I manage, which can flush all cache of all sites. Therefore, I created a file "flush-cache.php" in the ...
0
votes
0answers
64 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 ...
2
votes
2answers
54 views

What is difference between 'Page Cache' and 'Object Cache' in WordPress?

I am optimizing my WordPress website. I am using 2 WordPress plugins right now. First one is 'Autoptimize' for optimizing CSS, JS, and HTML. And another one is 'WP Super Cache' for caching pages. ...
1
vote
1answer
282 views

Wordpress REST API, Expired Nonce from Cache results in 403 forbidden

My wordpress site sits behind Akamai, which is a cacheing service similar to Cloudflare. I make the following API call: GET /wp-json/mytheme/v1/get-posts?post_type=videos This is done using ...
1
vote
0answers
211 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 ...
0
votes
0answers
11 views

Caching on site with ACF Custom Post Type Relationships

I've got a small niche wordpress site where registered users enter data via forms on the site (or the wp rest api via mobile app). Currently I have no caching plugin. On the site, the user creates ...
2
votes
2answers
61 views

How can I free up the memory used by update_post_meta?

I've noticed that each call to update_post_meta results in a small increase in my memory usage. Normally, the increase is small enough to not matter. But I'm writing a CSV import function that calls ...
0
votes
0answers
41 views

Remote Custom Post Type

I've got a remote source of data - customers and the items they've purchased - which resides on a different server and uses a system that's not Wordpress. But it's got a REST API I can call to obtain ...
1
vote
1answer
21 views

Preferred way of cacheing a value in php

I have a couple of pages that make calls to an external API to retrieve a value. Obviously, doing this every time the page loads is horribly slow. What is the preferred way of cacheing this value for ...
0
votes
1answer
33 views

How to solve minify js and css first time load delay?

Scenario: - My site pages and most pages usually loads around 3s to 5s. - I have a lot of posts on my site and new posts are added every 12 hours. I did not use any on site caching plugin to avoid ...
0
votes
0answers
32 views

Refresh page after login with litespeed cache

I am using the litespeed cache plugin and ajax login plugin. The page does not refresh after users log in. it actually seems to be refreshing, but no. I can not. // $form.data("action") for get ...
0
votes
1answer
240 views

Enqueue script with version number not working

I am trying to enqueue a script for a custom plugin and I want to include a version number for cache busting. However, the ?ver= query is not being appended to the script name in the html and ...
0
votes
0answers
27 views

What does wp query caching parameters do?

if i set 'cache_results' => false whether caching will be ignored? Say if I am using popular plugins like w3 Cache, WP Super Cache. if order by rand is used then caching can create issues I think. ...
0
votes
0answers
40 views

Simple global, in-memory, persistent object for storing result of stemming a relatively large JSON blob

I'm relatively new to WordPress. I have this 2.6 MB json file: https://raw.githubusercontent.com/codeforamerica/naics-api/master/data/naics-2012.json It's a list of around 2000 entries where every ...
0
votes
0answers
12 views

CSS, JS, PHP modified settings only work after installing a caching plugin

I’ve modified the CSS, JS, PHP files in our WordPress template. The interesting thing is when I don’t install any caching plugin modifications don't work but when I install Autoptimize WordPress ...
2
votes
1answer
30 views

Why specific file directory fails to redirect but its parent folder succeeds?

I activated multisite using subdirectories on my old WordPress site, and I created a new site (say my-example.com/new-site/). I found links such as my-example.com/new-site/wp-content/mu-plugins/css/ ...
0
votes
0answers
22 views

Way to prevent snippet of template from being cached?

I have some PHP logic in a template that randomly loads some content. Logged in, this works great. Logged out, caching prevents different content from being loaded each refresh. Is there a good way ...
0
votes
1answer
895 views

Service Worker Uncaught (in promise) DOMException

My Service Worker Troubles with error, Uncaught (in promise) DOMException. My SW runs perfectly, and gives a prompt to install PWA when on mobile, but it gives this error. My url is Milyin. It will ...
0
votes
1answer
245 views

How to make login / logout links cache independent?

I used a snippet to create WooCommerce login / logout links via functions.php, present on literally every single Wordpress-related website and highly upvoted. As usual it doesn't really work. Once ...
-1
votes
1answer
18 views

CSS messes up when CACHE is cleared

I have a wordpress site: www.gravitywild.com The latests posts I've added don't show. I talked to support and they told me to erase the site cache and so I did. This is what the site looked like ...
0
votes
0answers
13 views

Non Admins Getting Cached Posts

I'm having a strange issue with wordpress posts getting cached. If an admin is logged in they do not receive a cached post however a regular visit is cached. I do not have any caching plugins and the ...
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'...
0
votes
0answers
41 views

Front page is not updating content

I have emergency problem. My home page has static page set for front page and post page is blog. I am using the WPBakery Page Builder plugin to design and create content. But somehow I'm unable to ...
1
vote
1answer
193 views

Write to / remove from default .htaccess file from plugin?

I'm working on a WordPress plugin, and I have a checkbox option to add cache control headers. I'd like to write to the htaccess file if the option is set to 1, else remove the new content. I've been ...
1
vote
1answer
91 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 ...
0
votes
1answer
35 views

How does WP's cache maintain persistence through page reloads?

I've thoroughly analyzed WP's cache, its functions and what it does and although simple in its design, it's effective: an object where you keep adding data that might be used somewhere else, so you ...
1
vote
2answers
512 views

Remove caching from wp_remote_get calls from custom plugin

I wrote a plugin to hit an API and display results on a page. When I was testing, every time I hit "preview", the plugin would hit the API and retrieve the most recent data. Now that the plugin is ...
0
votes
1answer
28 views

Should I store critical css in the database or in my theme's filesystem?

I have a method for detecting a post's critical css when the page is requested and in-lining it to optimize page speed. I would like to cache this css to avoid having to compile it for every page ...
0
votes
2answers
205 views

Use WP Cron to Clear a Page Cache?

I'm using a plugin (Comet Cache) to save static versions of a particular page I have on my site. Inside the plugin, I have the cache set to clear every 2 hours (that way this page can show the ...