@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
12 lines (10 loc) • 570 B
JavaScript
/**
* Generates a unique cache key for DTO instances based on entity name, route method, DTO type, guard, and config.
* @param {IDtoGenerateCacheKey} key - The key object containing entity name, method, DTO type, guard name, and DTO config
* @returns {string} A unique string key for caching DTO instances
*/
function DtoGenerateCacheKey(key) {
return `${key.entityName}_${key.method}_${key.dtoType}_${key.guardName ?? "no-guard"}_${JSON.stringify(key.dtoConfig ?? {})}`;
}
export { DtoGenerateCacheKey };
//# sourceMappingURL=generate-cache-key.utility.js.map