BoldGrid / w3-total-cache

GNU General Public License v2.0
152 stars 84 forks source link

Cache Ajax requests #299

Open tdechangy opened 3 years ago

tdechangy commented 3 years ago

As stated @ [https://wordpress.org/support/topic/how-to-cache-ajax-requests/#post-13619511] I was asking a way to enable caching some or all Ajax requests as important missing option.

Here is a solution I found that might inspire you : While looking for a solution I saw this for the Swift Performance plugin which has this kind of much needed feature @ https://swiftperformance.io/blog/how-to-cache-ajax-get-requests-with-swift-performance-pro/ It’s a bit additional work in their case, but for sure, this should dramatically enhance any dynamic website’s performance (eventually including ecommerce ones if some configurations might stick wisely).

However, while looking to the website (https://www.mathieuweemaels.be), I I didn’t see any clear admin-ajax.php call, instead this plugin uses a xhr” container where lays an ajax call.. Maybe can you also have an overlook on the site’s homepage and open a popup from the art pieces grid.

mavas84 commented 3 years ago

Hello @tdechangy Thank you for taking the time to submit the request. We'll put this request in the backlog and as I mentioned, check if there will be more requests from other users for this feature. The devs will take a look at this and get back to you with more info. Thanks!

oluendo commented 3 years ago

I would love to have such feature

yakovserebryakov commented 2 years ago

I would love to have such feature also

tdechangy commented 2 years ago

I love seeing new users showing their interest here. As it is only the tip of the iceberg, this will certainly be highly appreciated by the biggest clients, like ecommerce and listing websites.

Hoping to see that coming in 2022, so let us know where it is in the process. Regards.

davidwebca commented 2 years ago

Yup, some other plugins have this and it's becoming more and more relevant with Rest and GraphQL apis being used more and more often to display normal content. Having a setting in the admin to specify which AJAX action should be cached would be amazing.

eddr commented 2 years ago

Hi

Any update? This is a necessary functionality for fine tuned dynamic sites indeed Would like something like the page cache, only for ajax

SeanAUS120 commented 2 years ago

Yeah, this would be amazing for ajax search results; especially on big sites. Would make ajax search a great solution instead of having to go to elastic search or 3rd party search tools.

mareqj commented 1 year ago

This is why I use swift performance, they have what other plugins don't. If you ever add this, I would definitely check it.