refactor: move requires down

This commit is contained in:
Barış Soner Uşaklı
2024-06-10 17:18:41 -04:00
parent 795a0daa03
commit 8eccdb481f

View File

@@ -1,12 +1,11 @@
'use strict';
const cacheCreate = require('../cache/lru');
const meta = require('../meta');
let cache = null;
exports.getOrCreate = function () {
if (!cache) {
const cacheCreate = require('../cache/lru');
const meta = require('../meta');
cache = cacheCreate({
name: 'post',
maxSize: meta.config.postCacheSize,