If prebuild starts, but can’t cache pages usually there are multiple cache layers (eg: Varnish, Nginx/FastCGI cache) which is not configured properly. First please consider to use only one caching solution, however if you would like to use multiple caches, please be sure they are configured properly in Swift.

For Cloudflare please configure API in Settings » CDN » Cloudflare

For Varnish enable Autopurge in Caching > Varnish

If it is necessary, please set Custom Host (in most cases it is 127.0.0.1)

If you are using other cache, like Nginx/FastCGI cache you need to install and configure Nginx helper plugin, or disable the extra cache layer (it won’t significantly affect speed).
Sometimes cache is not working because some error occurred during the cache generation process. To see what is the exact issue please check the PHP error log.