Under Finder use the Go to Folder... option and enter this: ~/Library/Caches/com.apple.Safari/
Then try making your read-only settings with this file and see what happens.
Cache.db
Caution: I have not tried what you want to do, so I suggest ensuring you have a backup or make a copy of the original in case things go haywire.