Splitting site cache between mobile and desktop

I've tried implementing cachine per device by enabling the "Cache by device type" however if the first visit after the cache is purged is a mobile visitor, Desktop users will use that layout, and vice versa. Other then purchasing Enterprise for access to the more granular device type are there any other options? Potentially an expression like this:
(any(http.request.headers["HTTP_CF_DEVICE_TYPE"][*] eq "mobile"))

Or alternatively maybe a cloudflare worker would work with this?
Was this page helpful?