Socket
Socket
Sign inDemoInstall

egg-core

Package Overview
Dependencies
Maintainers
4
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-core - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

5

History.md
2.0.1 / 2017-02-15
==================
* fix: context loader cache independent in each request (#54)
2.0.0 / 2017-02-10

@@ -3,0 +8,0 @@ ==================

15

lib/loader/context_loader.js

@@ -48,9 +48,2 @@ 'use strict';

const app = this.options.inject;
// distinguish property cache
// e.x. ctx.service1 and ctx.service2 have different cache
if (!this[CLASSLOADER]) {
this[CLASSLOADER] = new Map();
}
const classLoader = this[CLASSLOADER];
const property = options.property;

@@ -61,2 +54,10 @@

get() {
// distinguish property cache,
// cache's lifecycle is the same with this context instance
// e.x. ctx.service1 and ctx.service2 have different cache
if (!this[CLASSLOADER]) {
this[CLASSLOADER] = new Map();
}
const classLoader = this[CLASSLOADER];
let instance = classLoader.get(property);

@@ -63,0 +64,0 @@ if (!instance) {

{
"name": "egg-core",
"version": "2.0.0",
"version": "2.0.1",
"description": "A core Pluggable framework based on koa",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc