lets say that in SparkCache I have value named "cachedVal", how can I replace it instead of remove and put it again? I mean how can I made atomic request to cache? Because now if I have 1kk users and everyone makes something like this:
if(cache.get("cachedVal") != null)
{
cache.remove("cachedVal");
cache.put("cachedVal", newVal);
}
I get a lot of crashes because they in the same time make remove and put requests. Is there any solution for atomic cache request or to solve this problem?
Marcin Olszewski
Hi,
lets say that in SparkCache I have value named "cachedVal", how can I replace it instead of remove and put it again? I mean how can I made atomic request to cache? Because now if I have 1kk users and everyone makes something like this:
if(cache.get("cachedVal") != null)
{
cache.remove("cachedVal");
cache.put("cachedVal", newVal);
}
I get a lot of crashes because they in the same time make remove and put requests. Is there any solution for atomic cache request or to solve this problem?
Hi Marcin,
Have you considered making use of Spark.lockKey?
-Pádraig
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Marcin,
Have you considered making use of Spark.lockKey?
-Pádraig
1 person likes this
Marcin Olszewski
Marcin Olszewski
Customer Support
Hi Marcin,
A lock will be relinquished either when it is explicitly released using Spark.unlockKey, or upon termination of the script.
This includes a scenario where your script encounters a fatal error before that explicit call.
- Patrick.
1 person likes this
Marcin Olszewski
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics