SetSessionCacheObject
Stores a JSON object temporarily within the current session. Note that the data will be lost when the session expires.
Method Parameters
Parameter | Description |
---|---|
key | The storage-name for the object |
cacheObject | The JSON object to store |
tip
Apps are limited to 5 cached objects per session, with each restricted to 512 characters of stringified JSON data.
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var addressJson = {};
addressJson.city = "Ottawa";
addressJson.province = "Ontario";
bridge.setSessionCacheObject( "address", addressJson );
var addressJson = {};
addressJson.city = "Ottawa";
addressJson.province = "Ontario";
bridge.setSessionCacheObject( "address", addressJson );