@adobe/acc-js-sdk 1.1.17 → 1.1.19

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/docs/caches.html CHANGED
@@ -24,25 +24,35 @@ client.clearEntityCache();
24
24
  client.clearAllCaches();
25
25
  </pre>
26
26
 
27
- <p>Caches have a TTL of 5 minutes by default. The TTL can be changed at connection time using connection options <b>entityCacheTTL</b>, <b>methodCacheTTL</b>, and <b>optionCacheTTL</b>.</p>
27
+ <p>Caches have a TTL of 5 minutes by default. The TTL can be changed at connection time using connection options
28
+ <b>entityCacheTTL</b>, <b>methodCacheTTL</b>, and <b>optionCacheTTL</b>.</p>
28
29
 
29
- <p>Caches can be de-activated by setting a TTL of -1 which will have the effect of making all cached data always invalid.</p>
30
+ <p>Caches can be de-activated by setting a TTL of -1 which will have the effect of making all cached data always
31
+ invalid.</p>
30
32
 
31
33
 
32
34
 
33
35
  <h1>Persistent caches</h1>
34
- <p>In addition to memory caches, it is possible to use persistent caches as well. This was introduced in version 1.0.5 and is active by default as well when using the SDK in a browser. The browser local storage is used (if allowed).</p>
36
+ <p>In addition to memory caches, it is possible to use persistent caches as well. This was introduced in version 1.0.5
37
+ and is active by default as well when using the SDK in a browser. The browser local storage is used (if allowed).</p>
35
38
 
36
- <p>Cached data is stored in local storage with keys prefixed with <b>acc.js.sdk.{{version}}.{{server}}.cache.</b> where <b>version</b> is the SDK version and <b>server</b> is the Campaign server name. This means that the cached data is lost when upgrading the SDK.</p>
39
+ <p>Cached data is stored in local storage with keys prefixed with <b>acc.js.sdk.{{version}}.{{server}}.cache.</b> where
40
+ <b>version</b> is the SDK version and <b>server</b> is the Campaign server name. This means that the cached data is
41
+ lost when upgrading the SDK.</p>
37
42
 
38
43
  <p>It's possible to disable persistent caches using the <b>noStorage</b> connection option.</p>
39
44
 
40
- <p>It is also possible to setup one's own persistent cache, by passing a <b>storage</b> object as a connection option. This object should implement 3 methods: <b>getItem</b>, <b>setItem</b>, and <b>removeItem</b> (synchronous)</p>
45
+ <p>It is also possible to setup one's own persistent cache, by passing a <b>storage</b> object as a connection option.
46
+ This object should implement 3 methods: <b>getItem</b>, <b>setItem</b>, and <b>removeItem</b> (synchronous)</p>
41
47
 
48
+ <p>Additionally, since version 1.1.18, the <b>storage</b> object should also support the for...in operator to iterate through its keys</p>
42
49
 
43
50
  <h1>Auto-refresh caches</h1>
44
51
 
45
- <p>The SDK includes a mechnism to maintain the schemas and options caches up-to-date by polling the Campaign server on a regular basis (10 seconds by default). The server returns the list of entities (schemas or options) which have changed since they were cached, and the client removes them from the cache. When a schema changes, the corresponding methods are also removed from the method cache.</p>
52
+ <p>The SDK includes a mechnism to maintain the schemas and options caches up-to-date by polling the Campaign server on a
53
+ regular basis (10 seconds by default). The server returns the list of entities (schemas or options) which have changed
54
+ since they were cached, and the client removes them from the cache. When a schema changes, the corresponding methods
55
+ are also removed from the method cache.</p>
46
56
 
47
57
  <p>This mechanism is not activate by default but can be activated or deactivated by the following functions</p>
48
58
 
@@ -51,7 +61,8 @@ client.startRefreshCaches(30000); // activate cache auto-refresh mechanism eve
51
61
  client.stopRefreshCaches(); // de-activate cache auto-refresh
52
62
  </pre>
53
63
 
54
- <p>This mechanism is based on the <b>xtk:session#GetModifiedEntities</b> SOAP method which is only available in Campaign 8.4 and above only. For other builds of Campaign, the auto-refresh mechanism will not do anything. </p>
64
+ <p>This mechanism is based on the <b>xtk:session#GetModifiedEntities</b> SOAP method which is only available in Campaign
65
+ 8.4 and above only. For other builds of Campaign, the auto-refresh mechanism will not do anything. </p>
55
66
 
56
67
  <p>The following changes are handled:</p>
57
68
  <ul>
@@ -62,7 +73,11 @@ client.stopRefreshCaches(); // de-activate cache auto-refresh
62
73
 
63
74
  <p>The refresh mechanism includes the following guardrails</p>
64
75
  <ul>
65
- <li>Both xtk:option and xtk:schema caches are refreshed every n seconds. To avoid issuing two API calls at the same time to the server, the schema cache refresh call is delayed by a few seconds. In the future this delay may change.</li>
66
- <li>If the xtk:session#GetModifiedEntities API is not available, the auto refresh mechanism will silently stop automatically</li>
67
- <li>If an error occurs while trying to refresh, a warning will be logged to the JavaScript console but the auto refresh will not be stopped. </li>
76
+ <li>Both xtk:option and xtk:schema caches are refreshed every n seconds. To avoid issuing two API calls at the same
77
+ time to the server, the schema cache refresh call is delayed by a few seconds. In the future this delay may change.
78
+ </li>
79
+ <li>If the xtk:session#GetModifiedEntities API is not available, the auto refresh mechanism will silently stop
80
+ automatically</li>
81
+ <li>If an error occurs while trying to refresh, a warning will be logged to the JavaScript console but the auto
82
+ refresh will not be stopped. </li>
68
83
  </ul>
@@ -2,6 +2,27 @@
2
2
  layout: page
3
3
  title: Change Log
4
4
  ---
5
+
6
+ <section class="changelog"><h1>Version 1.1.19</h1>
7
+ <h2>2022/12/21</h2>
8
+
9
+ <li>Add the X-Session-Token custom header to all SOAP and API calls</li>
10
+ </section>
11
+
12
+ <section class="changelog"><h1>Version 1.1.18</h1>
13
+ <h2>2022/12/20</h2>
14
+
15
+ <li>Automatically remove from local storage key items which correspond to previous versions of the SDK.</li>
16
+ </section>
17
+
18
+ <section class="changelog"><h1>Version 1.1.17</h1>
19
+ <h2>2022/12/06</h2>
20
+
21
+ <li>Fix a bug in schemas: the editType property of a schema node was not set properly (internal attribute is named "edit" but property exposed by the API is "editType")</li>
22
+ <li>Fix a bug with encoding of the SOAP urls: query parameter was not escaped properly</li>
23
+ <li>Add observer callbacks before and after SOAP calls (onBeforeCall, onAfterCall) which allow to intercept SOAP calls and modify SOAP call parameters and results. See the "Method Interception" section in <a href="https://opensource.adobe.com/acc-js-sdk/observability.html">the observability documentation</a> for more details</li>
24
+ </section>
25
+
5
26
  <section class="changelog"><h1>Version 1.1.16</h1>
6
27
  <h2>2022/11/29</h2>
7
28