Adds a feature flag to cache timed out tile requests: cacheOnTimeout

This commit is contained in:
Raul Ochoa 2015-04-06 18:52:54 +02:00
parent 21072645a4
commit 2e1f08d764
5 changed files with 13 additions and 0 deletions

View File

@ -196,6 +196,9 @@ var config = {
// Use this as a feature flags enabling/disabling mechanism
,enabledFeatures: {
// whether a timed out render request should be cached in memory after is computed or not
// beware keeping it will grow up the memory usage
cacheOnTimeout: false,
// whether it should intercept tile render errors an act based on them, enabled by default.
onTileErrorStrategy: true,
// whether the affected tables for a given SQL must query directly postgresql or use the SQL API

View File

@ -196,6 +196,9 @@ var config = {
// Use this as a feature flags enabling/disabling mechanism
,enabledFeatures: {
// whether a timed out render request should be cached in memory after is computed or not
// beware keeping it will grow up the memory usage
cacheOnTimeout: false,
// whether it should intercept tile render errors an act based on them, enabled by default.
onTileErrorStrategy: true,
// whether the affected tables for a given SQL must query directly postgresql or use the SQL API

View File

@ -196,6 +196,9 @@ var config = {
// Use this as a feature flags enabling/disabling mechanism
,enabledFeatures: {
// whether a timed out render request should be cached in memory after is computed or not
// beware keeping it will grow up the memory usage
cacheOnTimeout: false,
// whether it should intercept tile render errors an act based on them, enabled by default.
onTileErrorStrategy: true,
// whether the affected tables for a given SQL must query directly postgresql or use the SQL API

View File

@ -192,6 +192,9 @@ var config = {
// Use this as a feature flags enabling/disabling mechanism
,enabledFeatures: {
// whether a timed out render request should be cached in memory after is computed or not
// beware keeping it will grow up the memory usage
cacheOnTimeout: false,
// whether it should intercept tile render errors an act based on them, enabled by default.
onTileErrorStrategy: true,
// whether the affected tables for a given SQL must query directly postgresql or use the SQL API

View File

@ -269,6 +269,7 @@ module.exports = function(redisPool) {
function handleTilerLimits(err, renderLimit) {
assert.ifError(err);
rendererOptions.limits = {
cacheOnTimeout: global.environment.enabledFeatures.cacheOnTimeout || false,
render: renderLimit
};
return null;