mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 03:27:01 +02:00
refactor: posts cache to get rid of require in functions
This commit is contained in:
@@ -6,7 +6,7 @@ const utils = require('../../utils');
|
||||
const plugins = require('../../plugins');
|
||||
|
||||
cacheController.get = async function (req, res) {
|
||||
const postCache = require('../../posts/cache');
|
||||
const postCache = require('../../posts/cache').getOrCreate();
|
||||
const groupCache = require('../../groups').cache;
|
||||
const { objectCache } = require('../../database');
|
||||
const localCache = require('../../cache');
|
||||
@@ -46,7 +46,7 @@ cacheController.get = async function (req, res) {
|
||||
|
||||
cacheController.dump = async function (req, res, next) {
|
||||
let caches = {
|
||||
post: require('../../posts/cache'),
|
||||
post: require('../../posts/cache').getOrCreate(),
|
||||
object: require('../../database').objectCache,
|
||||
group: require('../../groups').cache,
|
||||
local: require('../../cache'),
|
||||
|
||||
Reference in New Issue
Block a user