THESE STEPS ARE NOT 100% ACCURATE BEYOND 0.7.2 !!
Here is a quick and dirty over view of how GeoWebCache processes a request
Startup
GeoWebCache wil scan for layer_*.properties files and create a layer object for each. These are indexed by name in a hashtable.
Request
- GET request is received, program determines whether it is a request for WMS, Virtual Earth or Google Maps (not finished)
- If it is a Virtual Earth quadkey or Google Maps request then a parser transforms it into WMS before continuing
- The name of the layer is extracted. If it is known, the appropriate layer object is fetched.
- Request is passed on to CacheLayer? object, which determines whether the request is (loosely) supported.
- If it is not supported then an error message explaining the problem is returned
- The layer object then gets the WMS request and creates an internal grid representation (x,y,z) based on the grid. In the current version (svn) a grid is based on the bounds of the coordinate system, not the bounds of the layer.
- A cache key is generated based on the grid, the requested output format and the type of cache backend.
- A metatile key is generated based on the grid location and the metatiling options for the layer
- A lock is acquired for this metatile
- The cache is queried
- If a result is found the lock is realeased and the tile returned to the user
- If a result is not found, the metatile key is used to make a WMS request to the backend. This request is based on the configuration of the layer, it does not carry any of the parameters set by the client. The response is sliced into X tiles and they are stored to the cache backend.
- The cache is queried again to fetch the tile
- The lock is released and the tile returned to the user.
Seeding
Todo
