Modules

filter

 

Objects/Functions

module (N/cache)

SuiteScript 2.0

cache.getCache(options)

{cache}.getCache({name: {string*},scope: {string}})

N/cache Module
cache.getCache()
Method Description: Checks for a cache object with the specified name. If the cache exists, this method returns the cache object. If the cache does not exist, the system creates it.
Returns: cache.Cache
Supported Script Types: All server-side scripts For additional information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/cache Module
Sibling Module Members: N/cache Module Members
Since: 2016.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=cache.getCache(options)

Example:

// Code Example 1
//Add additional code
//...
var myCache = cache.getCache({
name: 'temporaryCache',
scope: cache.Scope.PRIVATE
});
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4642627983.html