In Memory Data (IMD)

IMD API.

Allows you to store data in fast memory for 20 minutes. It works like a very fast cache. Storing data in the In Memory Data is a lot faster than storing data a database collection. Here are a few examples In Memory Data can be used for:

  • Storing a temporary token that will expire within 20 minutes.
  • Storing a temporary password that will expire within 20 minutes.
  • Any app temporary app data which requires very fast access.

Method summary

Method

Description

put(key, value)

Inserts a specified value with a specified key into In Memory Data (cache). Both key (max. length 64 chars) and value (max. length 255 chars) must be strings.

get(key)

Returns a value specified by a key, or null if the cache contains no such key.

remove(key)

Removes the key/value if such key is present in In Memory Data (cache).

contains(key)

Returns true if the cache contains a value with such key.

length()

Returns the number of key-value pairs in In Memory Data (cache).

keys()

Returns an array of the keys contained in In Memory Data (cache).