@itutoring/itutoring_application_js_api 1.6.6 → 1.6.8
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/apiController.js +4 -4
- package/modules/LectorDatabase.js +1 -1
- package/package.json +1 -1
package/apiController.js
CHANGED
|
@@ -110,11 +110,11 @@ class APIController
|
|
|
110
110
|
* @param data "data must be as array - key, value pair. They'll be passed into the request"
|
|
111
111
|
* @returns "Response from server"
|
|
112
112
|
*/
|
|
113
|
-
static async Get(module, method, data, useCache = false)
|
|
113
|
+
static async Get(module, method, data, useCache = false, cacheSuffix = "")
|
|
114
114
|
{
|
|
115
|
-
if (useCache && APICache.IsCached(module + method))
|
|
115
|
+
if (useCache && APICache.IsCached(module + method + cacheSuffix))
|
|
116
116
|
{
|
|
117
|
-
return APICache.Retrive(module + method);
|
|
117
|
+
return APICache.Retrive(module + method + cacheSuffix);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
await APIController.GetLocalRKey();
|
|
@@ -134,7 +134,7 @@ class APIController
|
|
|
134
134
|
var response = APIController.ResolveResponse(request);
|
|
135
135
|
if (useCache)
|
|
136
136
|
{
|
|
137
|
-
APICache.Cache(module + method, response);
|
|
137
|
+
APICache.Cache(module + method + cacheSuffix, response);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
resolve(response);
|