No, they’re not guaranteed to be portable and ar bound to vendor, device and a unique cache identifier. As such you need to extract the pipelineCacheUUID that the cache was created for from the header and compare against the pipelineCacheUUID physical device property of the GPU you want to load the cache for.
You’ll probably get an error when trying to generate pipelines from that cache.
See chapter 9.6 of the specs. It has a table with the header layout that you’d need to load and check against the properties of the device you want to use the cache on.
P.S. : There should be an API sample in the LunarG VulkanSDK for the pipeline cache. That may help you get started.