Motivation
GeoWebCache needs to store some special tiles, like empty ones, or avoid storing tiles that are the same (transparent, ocean blue). This requires metadata Additionally, the current file structure is probably too deep to achieve high performance.
Directory structure
Most filesystems use btree's to store the files in directories, so layername/projection_z/[x/(2(z/2))]_[y/(2(z/2))]/x_y.extension seems reasonable, since it works sort of like a quadtree. The idea is that half the precision is in the directory name, the full prevision in the filename to make it easy to locate problematic tiles. This will also make cache purges a lot faster, since fewer directories have to be traversed and unlinked.
Headers
These get baked into the Tile object. Each files should contain a 16 byte header with metadata, which can be expanded by subclasses in 16 byte increments.
The advantage of putting the headers into the file is improved performance, since only one file has to be read, but the downside is that the files can no longer be inspected with normal image viewers. However, it's pretty trivial to make a utility that strips away the first x16 bytes, if anyone needs it.
