"Cached objects are backed by mongo, so if an item is expired, when you try to access it again it will be reloaded."
er? Is that sentence referencing the way Mongo caches data? or SparkCache (a la redis?)
Obviously if I put something in SparkCache - IT doesn't know where it came from - so if it 'expires' - it couldn't possibly reload from an unknown source.
Best Answer
T
Tech Support
said
over 6 years ago
Jeff,
The sentence you mention is referencing the SparkCache - not the way Mongo caches data.
Objects placed into SparkCache are backed by a Mongo database on disk. So when the element expires, and you request it from the cache, the data can be reloaded from Mongo (by key). So the original source of the data may be unknown (i.e. any data you create) but the cache's own disk datastore is certainly not unknown to the cache.
Regards,
Jonathan.
1 Comment
Tech Support
said
over 6 years ago
Answer
Jeff,
The sentence you mention is referencing the SparkCache - not the way Mongo caches data.
Objects placed into SparkCache are backed by a Mongo database on disk. So when the element expires, and you request it from the cache, the data can be reloaded from Mongo (by key). So the original source of the data may be unknown (i.e. any data you create) but the cache's own disk datastore is certainly not unknown to the cache.
Jeff Amiel
so referencing https://docs.gamesparks.net/documentation/cloud-code-api/utils-cloud-code-api/sparkcache.
There is a sentence that always confused me:
"Cached objects are backed by mongo, so if an item is expired, when you try to access it again it will be reloaded."
er? Is that sentence referencing the way Mongo caches data? or SparkCache (a la redis?)
Obviously if I put something in SparkCache - IT doesn't know where it came from - so if it 'expires' - it couldn't possibly reload from an unknown source.
Jeff,
The sentence you mention is referencing the SparkCache - not the way Mongo caches data.
Objects placed into SparkCache are backed by a Mongo database on disk. So when the element expires, and you request it from the cache, the data can be reloaded from Mongo (by key). So the original source of the data may be unknown (i.e. any data you create) but the cache's own disk datastore is certainly not unknown to the cache.
Regards,
Jonathan.
Tech Support
Jeff,
The sentence you mention is referencing the SparkCache - not the way Mongo caches data.
Objects placed into SparkCache are backed by a Mongo database on disk. So when the element expires, and you request it from the cache, the data can be reloaded from Mongo (by key). So the original source of the data may be unknown (i.e. any data you create) but the cache's own disk datastore is certainly not unknown to the cache.
Regards,
Jonathan.
-
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