Changes between Version 1 and Version 2 of SharedTileCache


Ignore:
Timestamp:
2014-03-23T18:50:52+01:00 (12 years ago)
Author:
wavexx
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SharedTileCache

    v1 v2  
    8282== Cache discovery == #CacheDiscovery
    8383
    84 When initializing cache management, applications should list all available caches inside the shared tile cache, and parse their respective cache properties.
     84When initializing cache management, applications willing to use the shared tile cache should list all available caches inside the shared tile cache, and parse their respective properties files.
    8585
    86 Applications '''must not''' depending on the ID (given by the directory name), but should instead locate the cache by ''matching'' on "url", "type" and possibly "extension". If a suitable match is found, the ''existing'' ID/directory should be used for further access.
     86Applications '''must not''' depend on the ID (given by the directory name), but should instead locate the cache by ''matching'' on "url", "type" and possibly "extension". If a suitable match is found, the ''existing'' ID/directory should be used for further access.
    8787
    8888If no suitable directory can be found, a ''new'' directory can be safely created inside the shared root. The application is free to choose any valid directory name, but ''should'' use a short, explicative name.
     
    9292Assuming an empty tile cache, the application is free to create any file by downloading it from the provider and using the appropriate "/zoom/x/y.extension" pattern, creating missing directories.
    9393
    94 Additional data can be stored for each tile, using the file named "/zoom/x/y.extension.ini". This file follows the same convention as the [#CacheProperties] file, and is a simple UTF-8 encoded "key=value" file containing arbitrary keys which are application-defined. Again, applications '''must'' ignore unknown keys, ''can'' add new keys, but '''must'' also preserve any existing one when updating the content. Applications are free to create/update the metadata file at any time.
     94Additional data can be stored for each tile, using the file named "/zoom/x/y.extension.ini". This file follows the same convention as the [#CacheProperties] file, and is a simple UTF-8 encoded "key=value" file containing arbitrary keys which are application-defined. Again, applications '''must''' ignore unknown keys, ''can'' add new keys, but '''must''' also preserve any existing one when updating the content. Applications are free to create/update the metadata file at any time.
    9595
    9696When probing the cache for an existing tile, the application '''must''' check for the presence of the tile image "/zoom/x/y.extension" and check it's modification time. If the tile has been created ''or'' modified less than the specified cache age, the application '''must''' use the existing tile.
     
    110110* After deciding to create or update a tile, the image file ("/zoom/x/y.extension") '''must''' be moved ''atomically'' into the directory tree (and not created in-place), ''replacing'' any existing file (if any). At attempt can then be made to read the associated "ini" file. The "ini" file '''must be ignored''' if it's create/modification time is earlier than the image file and '''must''' then be deleted if not replaced.
    111111
    112 * When deleting an existing tile, an attempt to remove "ini" file must be made first, followed by the image file.
     112* When deleting an existing tile, the image file must be removed first, followed by an attempt to remove the "ini" file, and the x/zoom directories in turn.
    113113
    114114* Applications '''must not''' expect written tiles (or their metadata) to exist on disk or be the same as previously written.