q-koa 13.8.42 → 13.8.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -269,7 +269,9 @@ exports.initData = async ({ includes, excludes, app, ctx }) => {
269
269
  if (obj.setting && apiVersion && cacheVersion) {
270
270
  let target = null
271
271
  if (config) {
272
- const application = app.cache.get('application')
272
+ const application_key = `${app.appConfig.appName}-application`
273
+
274
+ const application = app.cache.get(application_key)
273
275
  if (application) {
274
276
  target = application.find((a) => a.config === config)
275
277
  }
@@ -189,8 +189,11 @@ exports.getImageType = (fileBuffer) => {
189
189
 
190
190
  exports.getAppConfig = async ({ app, config, key, app_id, id }) => {
191
191
  if (!(app && (config || key || app_id || id))) return null
192
+
193
+ const application_key = `${app.appConfig.appName}-application`
194
+
192
195
  const application =
193
- app.cache.get('application') || (await app.model.application.findAll())
196
+ app.cache.get(application_key) || (await app.model.application.findAll())
194
197
  const target = application.find(findConfig(config || key || app_id || id))
195
198
 
196
199
  return target || null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "13.8.42",
3
+ "version": "13.8.43",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {