My current site right now fills some elements in the home page (the menu content, some featured posts) from a wordpress backend using graphql. Also every individual page/post will also get its content from there.
How does webstudio "cache" these queries? And for how long? I remember reading something you guys said about increasing the time that info lives. In the designer itself the result of the query pretty much remains until you manually refresh and I wanted to check if there was a way to set the lifespan of that information. The current site doesn´t change information that often and increasing the life of the information before needing a query to the backend would reduce the load on the backend significantly.
I also would like to know about the call itself to the backend: Is it done by the server that holds the webstudio site itself? or by the browser client? I have been dealing with some unwanted ddos attacks on the site and backend and I am wondering If i can restrict the graphql endpoint to only allow requests from the IP of the webstudio server..
Overall I´m just looking to understand a little better how webstudio retrieves the info from a backend to try to come up with better solutions to keep the site up with less dependency on the backend site.
Im using Wordpress as my headless, and currently have a custom post named promotions, these have a custom field for the finish date which I can retreive in the Promotion page with no issue.
RIght now in order to show a banner on the page that shows the current promotion is expired we use a taxonomy so they select that the current promo is expired, since I can compare on the expression editor strings I can do this,
However I tried to improve the concept by using the promotion finish date... It should be a simple conditional:
object.finishdate > today ? true : false
However... I need to use at least the javscript Date object but I noticed the expresison editor doesnt allow me to put it inline... also noticed that the variables we can create can be string, number... but no date
One of our clients requires this directory and file to be present and its quite a headache in the current server, i wonder if its possible to include it in the website devewloped here