I guess the problem is related to cache partition. you can try to fix it with  

    fastboot format:ext4 cache

or from twrp recovery with  

    adb shell twrp wipe cache

You can manually backup your data (sdcard) partition. if data is encrypted, mount it with `twrp decrypt <password>` where you have to use your screen lock pin/password. if you use a screen lock pattern you must translate it to password (see [https://blog.alxu.ca/unlocking-large-pattern-encryption-in-twrp.html][1])  
GNU tar for android and external MicroSD Card or USB-OTG flash drive is reqired for this

    mkdir /data
    mount -t ext4 -w /dev/block/mmcblk0p28 /data
    mount /external_sd
    cp /external_sd/tar /tmp
    chmod a+x /tmp/tar
    /tmp/tar --selinux --xattrs --numeric-owner -vcpP /data | split -a 1 -b 1G - /external_sd/data.ext4.tar.

if partition is not mountable, you can copy the partition with dd

    busybox dd if=/dev/block/mmcblk0p28 of=/external_sd/data.img

  [1]: https://blog.alxu.ca/unlocking-large-pattern-encryption-in-twrp.html