It's not exactly caching.
They use a script loaded on the webserver, which communicates with their edge server. When a dynamic page is requested, the script is able to tell what portions of the page are different, and pull only the unique content/changes from the host, and serves the rest from cache.
i.e. Let's say you have a page that is dynamic (un-cachable) but the only difference is "Welcome (username)" at the top. Cloudflare will serve the page from cache, and only pull the username from the host.
Cloudflare Optimised Providers are able to provide Railgun to VPS and dedicated server customer's for a reduced or no cost. We have heard positive feedback from our customers that use Railgun!