Exultant/Citadel — pull request #59 by uncorr (2012-09-19 07:47:17+00:00)
Title: Adding chunk-wise RAM caching

RAM caching is added by extending CitadelDao. When the plugin wants to
query the database about a block, CitadelCachingDao transparantly loads
all the reinforcement data in the same chunk as that block into the RAM,
if it's not cached already. If changes are made to reinforcements on a
cached chunk, those changes are consolidated in ram so there'll only be
hd read/write when chunks are loaded/unloaded from the RAM cache. When
new chunks are loaded into RAM, all chunks older than an age given in
the config are released (and therefore flushed). There's a hard limit
to the amount of chunks that can be held in RAM (to make
resource-wasting griefing impossible) and when that limit is met, the
entire cache is bypassed (to prevent thrashing).

Right now this is completely untested, I haven't set up MySQL yet.

Also, the craftbukkit library is now local and included relatively for
ease of development.