"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetNetworksListUseCase = void 0;
const CACHE_KEY = 'networks:list';
const CACHE_TTL_SECONDS = 5 * 60; // 5 minutes
class GetNetworksListUseCase {
    networkRepository;
    cacheService;
    constructor(networkRepository, cacheService) {
        this.networkRepository = networkRepository;
        this.cacheService = cacheService;
    }
    async execute() {
        return this.cacheService.wrap(CACHE_KEY, () => this.networkRepository.findActive(), CACHE_TTL_SECONDS);
    }
}
exports.GetNetworksListUseCase = GetNetworksListUseCase;
//# sourceMappingURL=get-networks-list.use-case.js.map