Writing CacheDB