diff --git a/promise.js b/promise.js index 95b234e179..c4bb609038 100644 --- a/promise.js +++ b/promise.js @@ -2,6 +2,7 @@ const core = require('./index.js'); const EventEmitter = require('events').EventEmitter; +const parserCache = require('./lib/parsers/parser_cache.js'); function makeDoneCb(resolve, reject, localErr) { return function (err, rows, fields) { @@ -573,3 +574,11 @@ exports.__defineGetter__('Charsets', () => exports.__defineGetter__('CharsetToEncoding', () => require('./lib/constants/charset_encodings.js') ); + +exports.setMaxParserCache = function(max) { + parserCache.setMaxCache(max); +}; + +exports.clearParserCache = function() { + parserCache.clearCache(); +};