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 |
|
Parent Object |
|
Sibling Object Members |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
enum |
required |
The value of the caching duration. Use http.CacheDuration to set this value. 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, se N/http Module Script Samples.
// Add additional code
...
serverResponse.setCdnCacheable({
type: http.CacheDuration.MAX
});
...
// Add additional code