I've done something similar to this, in a currently developing mod (waiting on my texturer to get back to work). It implements 2 hash-maps or "Caches" one on the client and one on the server. Syncing them however has to split the data in parts, then send the parts as they're generated. I use a ChunkDataEvent.Load to load the data into my hash maps, the save event get them from the "server" cache, and saves them into the chunk data. Then i use the ChunkEvent.unload to mark them for removal.