cache_write function

Cache Save and Load (Write and Read)