# NO BUG: Query Load Conflict with Caching

**URL:** <https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853>\
**Category:** Bugs\
**Tags:** v1-10\
**Created:** [September 2, 2024, 3:41pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853 "2024-09-02T15:41:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lynxm](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/l/b9bd4f/32.png) [@lynxm](https://forum.bricksbuilder.io/u/lynxm)\
**Post date:** [September 2, 2024, 3:41pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/1 "2024-09-02T15:41:01Z")

</div>

I noticed an issue today with the query load functionality. I have a simple load more button on my blog page. When in admin mode, it works fine. When I have WP Fastest Cache & Redis Object Cache applied, it prints the following error to console when the Load More Button is clicked  
 ![image](https://forum.bricksbuilder.io/uploads/default/original/3X/c/a/ca780ebaf392632b873e66de9e74b569cf4ee47d.png)

> **[Blog | The Career Counter](https://thecareercounter.com/blog/)**
>
> Explore our blog for valuable insights on enhancing your job search, perfecting your resume, acing interviews, mastering home organization, and so much more!

How do I fix this conflict?

Thanks

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [September 2, 2024, 3:51pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/2 "2024-09-02T15:51:03Z")

</div>

Hey,  
so just to confirm.

If you don’t have any plugin enabled, it works. If you enable only WP Fastest Cache & Redis Object Cache, then it shows this error.

Is that correct?

---

<div class="post-metadata">

**Author:** ![lynxm](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/l/b9bd4f/32.png) [@lynxm](https://forum.bricksbuilder.io/u/lynxm)\
**Post date:** [September 2, 2024, 3:55pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/3 "2024-09-02T15:55:07Z")

</div>

@Matej - No, if I have them enabled, but in admin mode, it works. Once I look at it incognito mode and they are cached, then I have the issue

Those two plugins allow me to meet Google Page Speed’s draconian requirements

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [September 2, 2024, 4:51pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/4 "2024-09-02T16:51:44Z")

</div>

I don’t really have deep knowledge about those two plugins, but I suggest you narrow the problem down to one plugin, and then try to change the settings of that plugin so that it will not block our request anymore.  
You will have to play with settings a bit though.

First, which one of those plugins is causing the problem? Then I can try it also in my install, since the error is 403 - rest\_cookie\_invalid\_nonce, which I would like to replicate locally.

Best regards,  
M

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [September 3, 2024, 10:07am UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/5 "2024-09-03T10:07:42Z")

</div>

Hi @lynxm,

I checked a bit more and I can see this error, like I stated before.

 ![image](https://forum.bricksbuilder.io/uploads/default/original/3X/f/7/f742f11029796e032a5e131a95f0cfd8485206b9.png)

It looks like the nonce generated by WP already expired and is not allowed to access the rest API.  
Can you please check if you can reduce the caching time in your cache plugin to maybe 8 hours, and that may solve the issue.  
More info about caching lifespan here: [Nonces and Cache Lifespan - WP Rocket Knowledge Base](https://docs.wp-rocket.me/article/975-nonces-and-cache-lifespan)

Please let me know if that solved the issue.

Best regards,  
M

---

<div class="post-metadata">

**Author:** ![lynxm](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/l/b9bd4f/32.png) [@lynxm](https://forum.bricksbuilder.io/u/lynxm)\
**Post date:** [September 3, 2024, 2:39pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/6 "2024-09-03T14:39:14Z")

</div>

Interesting. I see that the premium version of WP Fastest Cache has a timeout /refresh feature.  
Their site is down at the moment, but once back up, i’ll try that and see if it works.

However, if WP has a nonce refresh time of 24 hours, are you suggesting 8 hours because that miminizes the amount of time they’re out of sync?

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [September 3, 2024, 3:44pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/7 "2024-09-03T15:44:06Z")

</div>

I think this is good article about this: [Cache Lifespan - WP Rocket Knowledge Base](https://docs.wp-rocket.me/article/1383-cache-lifespan)  
It’s for WP Rocket, but I believe it applies to WP Fastest Cache also.

Setting it to 8h for example, basically makes it sure that the page cache will be refreshed in the span of 24h, which is nonce refresh time.

Best regards,  
M

---

<div class="post-metadata">

**Author:** ![lynxm](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/l/b9bd4f/32.png) [@lynxm](https://forum.bricksbuilder.io/u/lynxm)\
**Post date:** [September 5, 2024, 3:13am UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/8 "2024-09-05T03:13:27Z")

</div>

I talked with the WP Fastest Cache team.

> The problem is caused by the WordPress nonce security system. To resolve this issue, you should add a cache timeout as below.
> 
> [Wordpress Nonce Cache](http://www.wpfastestcache.com/tutorial/wordpress-nonce-cache/)

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [September 5, 2024, 8:48am UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/9 "2024-09-05T08:48:21Z")

</div>

Yeah, that’s it then, like I have written above. Setting it to 8h (or in this case 10h) helps.

I’ll mark this as a NO BUG.

Thanks;  
M

---

<div class="post-metadata">

**Author:** ![lynxm](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/l/b9bd4f/32.png) [@lynxm](https://forum.bricksbuilder.io/u/lynxm)\
**Post date:** [September 5, 2024, 2:23pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/10 "2024-09-05T14:23:48Z")

</div>

Thanks for your help!

I confirmed its now working after making the timeout change

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [September 5, 2024, 2:34pm UTC](https://forum.bricksbuilder.io/t/no-bug-query-load-conflict-with-caching/25853/11 "2024-09-05T14:34:19Z")

</div>

Perfect,  
thank you for reporting back.

M
