@ti-engine/core 1.1.9 → 1.1.10

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  This document will contain the list of changes made to the framework. The format is based on the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
4
4
 
5
+ ## Version 1.1.10
6
+ * fix(cache): fix redis client creation sequence. It is now created inside the constructor as intended. It still needs to be initialized explicitly using the `initialize` method.
7
+
5
8
  ## Version 1.1.9
6
9
  * feat(redis integration)!: change the way the `redis` client is initialized. Instead of happening automatically on class instantiation, it is now initialized on demand using the `initialize` method.
7
10
  * feat(cache): change the way the main cache instance is initialized in compliance with the new redis integration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ti-engine/core",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "The ti-engine is an open source, free to use—both for personal and commercial projects—framework for the creation of microservice-based solutions using node.js.",
5
5
  "author": "Boris Kostadinov <kostadinov.boris@gmail.com>",
6
6
  "license": "GPL-3.0-or-later",
package/utils/cache.js CHANGED
@@ -36,6 +36,9 @@ class CommonMemoryCache extends ConnectionObserver {
36
36
  super();
37
37
 
38
38
  if ( !CommonMemoryCache.#instance ) {
39
+ this.#redisClient = redis.createRedisClient( this.#connectionIdentifier );
40
+ this.#redisClient.addConnectionObserver( this );
41
+
39
42
  CommonMemoryCache.#instance = this;
40
43
  }
41
44
  return CommonMemoryCache.#instance;
@@ -79,9 +82,6 @@ class CommonMemoryCache extends ConnectionObserver {
79
82
  let authKey = config.getSetting( config.setting.MEMORY_CACHE_AUTH_KEY );
80
83
  let user = config.getSetting( config.setting.MEMORY_CACHE_USER );
81
84
 
82
- this.#redisClient = redis.createRedisClient( this.#connectionIdentifier );
83
- this.#redisClient.addConnectionObserver( this );
84
-
85
85
  return this.#redisClient.initialize( host, port, authKey, user, db );
86
86
  }
87
87