Skip to content

Commit 7f35cf5

Browse files
committed
fix: missing parserCache in promise.js
1 parent 4ce2c70 commit 7f35cf5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

promise.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const core = require('./index.js');
44
const EventEmitter = require('events').EventEmitter;
5+
const parserCache = require('./lib/parsers/parser_cache.js');
56

67
function makeDoneCb(resolve, reject, localErr) {
78
return function (err, rows, fields) {
@@ -573,3 +574,11 @@ exports.__defineGetter__('Charsets', () =>
573574
exports.__defineGetter__('CharsetToEncoding', () =>
574575
require('./lib/constants/charset_encodings.js')
575576
);
577+
578+
exports.setMaxParserCache = function(max) {
579+
parserCache.setMaxCache(max);
580+
};
581+
582+
exports.clearParserCache = function() {
583+
parserCache.clearCache();
584+
};

0 commit comments

Comments
 (0)