ServerResponse.setCdnCacheable(options)
Method Description |
Sets CDN caching for a period of time. |
Returns |
void |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
required |
The value of the caching duration. When used with a Suitelet, if this value is set to UNIQUE, then the Suitelet will never be cached and will always be executed if there's a request to its URL. |
2015.2 |
Errors
Error Code |
Message |
Thrown If |
---|---|---|
|
Missing a required argument: {param name} |
The |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/https Module Script Samples.
// Add additional code
...
serverResponse.setCdnCacheable({
type: https.CacheDuration.LONG
});
...
// Add additional code