Expose renderer settings in the environment config files

These are: metatile, bufferSize and cache_ttl
This commit is contained in:
Sandro Santilli 2013-02-25 16:53:57 +01:00
parent f076b0c4d1
commit f6d50fafb1
6 changed files with 39 additions and 0 deletions

View File

@ -2,6 +2,7 @@
-----
* Do not let /etc/services confuse FD checker (munin plugin)
* Multilayer support (#72)
* Expose renderer settings in the environment config files
1.1.6 (19//02//13)
-----

View File

@ -29,6 +29,12 @@ var config = {
max_size: 500
}
,mapnik_version: undefined
,renderer: {
// Milliseconds since last access before renderer cache item expires
cache_ttl: 60000,
metatile: 4,
bufferSize: 64
}
,millstone: {
cache_basedir: '/tmp/cdb-tiler-dev/millstone-dev'
}

View File

@ -23,6 +23,12 @@ var config = {
max_size: 500
}
,mapnik_version: undefined
,renderer: {
// Milliseconds since last access before renderer cache item expires
cache_ttl: 60000,
metatile: 4,
bufferSize: 64
}
,millstone: {
cache_basedir: '/home/ubuntu/tile_assets/'
}

View File

@ -23,6 +23,12 @@ var config = {
max_size: 500
}
,mapnik_version: undefined
,renderer: {
// Milliseconds since last access before renderer cache item expires
cache_ttl: 60000,
metatile: 4,
bufferSize: 64
}
,millstone: {
cache_basedir: '/home/ubuntu/tile_assets/'
}

View File

@ -23,6 +23,12 @@ var config = {
max_size: 500
}
,mapnik_version: '2.0.2'
,renderer: {
// Milliseconds since last access before renderer cache item expires
cache_ttl: 60000,
metatile: 4,
bufferSize: 64
}
,millstone: {
cache_basedir: '/tmp/cdb-tiler-test/millstone'
}

View File

@ -6,6 +6,13 @@ var _ = require('underscore')
;
module.exports = function(){
var rendererConfig = _.defaults(global.environment.renderer || {}, {
cache_ttl: 60000,
metatile: 4,
bufferSize: 64
});
var me = {
base_url: '/tiles/:table',
base_url_notable: '/tiles',
@ -14,6 +21,13 @@ module.exports = function(){
cachedir: global.environment.millstone.cache_basedir,
mapnik_version: global.environment.mapnik_version || mapnik.versions.mapnik
},
mapnik: {
metatile: rendererConfig.metatile,
bufferSize: rendererConfig.bufferSize
},
renderCache: {
ttl: rendererConfig.cache_ttl
},
redis: global.environment.redis,
enable_cors: global.environment.enable_cors,
varnish_host: global.environment.varnish.host,