.. _mapcache_caches: ***************************************************************************** Cache Types ***************************************************************************** :Author: Thomas Bonfort :Contact: tbonfort at terriscope.fr This document details the different cache backends that can be used to store tiles .. _mapcache_cache_disk: Disk Caches -------------------------------------------------------------------------------- The disk based cache is the simplest cache to configure, and the one with the the fastest access to existing tiles. It is ideal for small tile repositories, but may cause trouble for sites hosting millions of tiles, as the number of files or directory may rapidly overcome the capabilities of the underlying filesystem. Additionaly, the block size chosen for the filesystem must closely match the mean size of a stored tile: ideally, any given tile should just fit inside a filesystem block, so as not to waste storage space inside each block, and not have to use up multiple blocks per tile. The location of the files/directories has to be readable and writable by the user running the tile server. There are two types of disk caches, that create a different hierarchy of files: Default Structure ================================================================================ The default disk cache stores tiles in a structure nearly identical to the file/directory hierarchy used by TileCache. The only change is that a top level directory corresponding to the name of the grid is added (as MapCache supports multiple grids per tileset) This cache is capable of detecting blank (i.e. uniform color) tiles and using a symbolic link to a single blank tile to gain disk space. .. code-block:: xml /tmp The two only configuration keys are the root directory where the tiles will be stored, and a key to activate the symbolic linking of blank tiles Template Structure ================================================================================ The template based disk cache allows you to create (or reuse an existing) tile structure that you define in advance. The