You might want to take a look at DirectoryBind, which was developed for things like this. It takes care for the user-configured "mounts" at boot-time and also on-demand, so nothing should "disappear" on a boot.
Basically, it is intended to map things from internal/phone storage to external/sd storage -- especially for cases like yours, were internal memory is running low.
NOTE: According to ce4's answer, this method will not bring any profit concerning the /data
folder, as /cache
is using its own partition (this seems to apply to all Android devices -- checked with 7 different devices from 5 different manufacturers; according to ce4 this is especially needed on encrypted devices, as an unencrypted partition is required to store firmware updates onto for execution). So if your concern is increasing storage on /data
, this won't do with /cache
. But if you simply need more space in /cache
, it should be perfectly fine. You could then use the original block device (where /cache
was pointing to) for something else ;)
NOTE2: AFAIK Google Playstore uses /data/local
to buffer its downloads. On most devices, this should only be a directory on the /data
partition, and thus could easily be handled by DirectoryBind.
Additional hint: check with the df
command from within a terminal whether the directory you want to move from internal to external storage is using a separate partition or not.
mount -o bind /mnt/sdcard/cache /cache
... this is in theory as have never tried it...