"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cacheRouteFactory = exports.cacheRoute = void 0;
const shared_1 = require("./shared");
const defaultOptions = {
    excludeStatus: [
        403,
        404
    ]
};
function cacheRoute(duration) {
    const instance = new shared_1.ApiCache(defaultOptions);
    return instance.buildMiddleware(duration);
}
exports.cacheRoute = cacheRoute;
function cacheRouteFactory(options) {
    const instance = new shared_1.ApiCache(Object.assign(Object.assign({}, defaultOptions), options));
    return instance.buildMiddleware.bind(instance);
}
exports.cacheRouteFactory = cacheRouteFactory;
//# sourceMappingURL=cache.js.map