diff --git a/config/environments/development.js b/config/environments/development.js index 0605a981..6078e76e 100644 --- a/config/environments/development.js +++ b/config/environments/development.js @@ -4,4 +4,7 @@ module.exports.redis = {host: '127.0.0.1', port: 6379, idleTimeoutMillis: 1, reapIntervalMillis: 1}; -module.exports.windshaft_port = 8181; \ No newline at end of file +module.exports.windshaft_port = 8181; +module.exports.lru_cache = true; +module.exports.lru_cache_size = 10000; +module.exports.enable_cors = true; diff --git a/config/environments/production.js b/config/environments/production.js index 1fc8c357..70638b80 100644 --- a/config/environments/production.js +++ b/config/environments/production.js @@ -1,4 +1,6 @@ module.exports.name = 'production'; module.exports.postgres = {user: 'tileuser', host: '127.0.0.1', port: 6432}; module.exports.redis = {host: '127.0.0.1', port: 6379}; -module.exports.windshaft_port = 8181; \ No newline at end of file +module.exports.windshaft_port = 8181; +module.exports.lru_cache:true, +module.exports.lru_cache_size: 10000 diff --git a/config/environments/test.js b/config/environments/test.js index 324b8c8b..b680d0aa 100644 --- a/config/environments/test.js +++ b/config/environments/test.js @@ -4,4 +4,7 @@ module.exports.redis = {host: '127.0.0.1', port: 6379, idleTimeoutMillis: 1, reapIntervalMillis: 1}; -module.exports.windshaft_port = 8080; \ No newline at end of file +module.exports.windshaft_port = 8080; +module.exports.lru_cache = false; +module.exports.lru_cache_size = 10000; +module.exports.enable_cors = true; diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index c68756aa..ba20dba5 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -7,7 +7,9 @@ module.exports = function(){ base_url: '/tiles/:table', grainstore: {datasource: global.environment.postgres}, redis: global.environment.redis, - enable_cors: true + enable_cors: global.environment.enable_cors, + lru_cache: global.environment.lru_cache, + lru_cache_size: global.environment.lru_cache_size }; /** @@ -99,4 +101,4 @@ me.getMapMetadata = function(req, callback){ }; return me; -}(); \ No newline at end of file +}();