Anyone familiar with the `N/cache` module? The hel...
# suitescript
a
Anyone familiar with the
N/cache
module? The help center says of the options is to run the scope of the cache
cache.Scope.PRIVATE
. This makes it private to this script. Does anyone know if this means it is private an instance of the script or just to script in the general sense. Meaning, if for example one user event script runs on two different records at the same time, do I need to worry about the keys conflicting with each other if the scope is private?
l
I have an experience with this in Mpa/Reduce script about 2 years old, maybe it changed since then. Even the scope was set to Private the script was able to share the same cache across its deployments. The easy way around it was to include deployment ID in the cache name
a
Thanks @Lukas Astalos That was the solution I thought of too, just wondering if it was neccessary
Now that you tell me it is, I will go back and implement it
@Lukas Astalos The truth is, I am realizing your case was different than mine. I only have one deployment (and hence one deployment id) My question was if that same deployment running 2 instances of the script (i.e. 2 of the same record type, such as sales orders, are saved at around the same time, triggering the same script to run twice. The id of the deployment is the same. I could use a different unique identifier, but my I guess I was wondering if that would be necessary in this case.