strapi-plugin-rest-cache
Version:
Speed-up HTTP requests with LRU cache
24 lines (18 loc) • 405 B
JavaScript
;
class CacheKeysConfig {
/**
* @type {string[]}
*/
useHeaders = [];
/**
* @type {Boolean|string[]}
*/
useQueryParams = true;
constructor(options = {}) {
const { useHeaders = [], useQueryParams = true } = options;
this.useHeaders = useHeaders;
this.useQueryParams = useQueryParams;
this.useHeaders.sort();
}
}
module.exports = { CacheKeysConfig };