@tiledesk/tiledesk-tybot-connector 0.1.80 → 0.1.81
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 +3 -0
- package/models/MongodbBotsDataSource.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
available on:
|
|
6
6
|
▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
|
|
7
7
|
|
|
8
|
+
### 0.1.81
|
|
9
|
+
- added expire: await tdcache.set(faqCacheKey, JSON.stringify(faq), {EX: 86400})
|
|
10
|
+
|
|
8
11
|
### 0.1.80
|
|
9
12
|
- removed log "faq not found, getting from datasource..."
|
|
10
13
|
- added in Directive IF_ONLINE_AGENTS "stop" in async (stop)
|
|
@@ -155,7 +155,11 @@ class MongodbBotsDataSource {
|
|
|
155
155
|
//console.log("faq not found, getting from datasource...");
|
|
156
156
|
faq = await this.getByIntentDisplayName(botId, key);
|
|
157
157
|
if (this.log) {console.log(".faq found in datasource:", JSON.stringify(faq));}
|
|
158
|
-
await tdcache.set(
|
|
158
|
+
await tdcache.set(
|
|
159
|
+
faqCacheKey,
|
|
160
|
+
JSON.stringify(faq),
|
|
161
|
+
{EX: 86400} // 1 day
|
|
162
|
+
);
|
|
159
163
|
// DEBUG CODE REMOVE
|
|
160
164
|
// let faq_ = await tdcache.get(faqCacheKey);
|
|
161
165
|
// console.log("_faq_as_string from cache debug:", faq_)
|