my site is application gathering data from many sources. So composing data for page takes 10+ seconds. But on the other hand those data changes very rare. So I can can pre-fetch all data and pre-prender all pages into html files. and then give those html files on http requests.
At the same time my server very slow handles http requests due to network issues. But I cant not use another one because of some legal matters.
So what I want is to upload those pre-rendered html files into Cloudflare Cache and store them there. And if data changes my application re-renders current pages and re-loads it into Cloudflare.
The obvious solution is to set up “cache everything” rule and then to use spider to send http requests to all pages so CF extracted pages from my origin server and cached them. When I need to update file I can purge file by API and send new http request.
But is there more elegant solution?
I looked into https://api.cloudflare.com but found nothing usefull for my goals.
And the second question is cache storage size and expiration. Volume of all pre-rendered site’s pages is around 100 Gb. Can I buy this space in CF Cache with guarantee that pre-rendered pages will never be removed from Cache even if they were not requested for long preiod of time. Untill I call purge API method by myself?