code: function(name, url, layername, options) {
          this.layername = layername;
          OpenLayers.Layer.Grid.prototype.initialize.apply(this,
                                                           [name, url, {}, options]);
          this.extension = this.format.split('/')[1].toLowerCase();
          this.extension = (this.extension == 'jpg') ? 'jpeg' : this.extension;
      }
docs: Constructor: OpenLayers.Layer.TileCache
  Create a new read only TileCache layer.
  
  Parameters:
  name - {String} Name of the layer displayed in the interface
  url - {String} Location of the web accessible cache (not the location of
  your tilecache script!)
  layername - {String} Layer name as defined in the TileCache
  configuration
  options - {Object} Optional object with properties to be set on the
  layer.  Note that you should speficy your resolutions to match
  your TileCache configuration.  This can be done by setting
  the resolutions array directly (here or on the map), by setting
  maxResolution and numZoomLevels, or by using scale based properties.