Windshaft-cartodb/lib/cartodb/cache_validator.js
2011-11-30 19:59:28 +01:00

18 lines
375 B
JavaScript

var _ = require('underscore'),
Varnish = require('./varnish')
var varnish_queue = null;
function init(host, port) {
varnish_queue = new Varnish.VarnishQueue(host, port);
}
function invalidate_db(dbname) {
varnish_queue.run_cmd('purge obj.http.X-Cache-Channel == ' + dbname);
}
module.exports = {
init: init,
invalidate_db: invalidate_db
}