mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
refactor: move requires down
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const cacheCreate = require('../cache/lru');
|
|
||||||
const meta = require('../meta');
|
|
||||||
|
|
||||||
let cache = null;
|
let cache = null;
|
||||||
|
|
||||||
exports.getOrCreate = function () {
|
exports.getOrCreate = function () {
|
||||||
if (!cache) {
|
if (!cache) {
|
||||||
|
const cacheCreate = require('../cache/lru');
|
||||||
|
const meta = require('../meta');
|
||||||
cache = cacheCreate({
|
cache = cacheCreate({
|
||||||
name: 'post',
|
name: 'post',
|
||||||
maxSize: meta.config.postCacheSize,
|
maxSize: meta.config.postCacheSize,
|
||||||
|
|||||||
Reference in New Issue
Block a user