3

The Platform Cache Partition Class allows a time to live to be specified when a value is put into the cache:

put(key, value, ttlSecs)

Stores the specified key/value pair as a cached entry in the cache
partition and sets the cached value’s lifetime.
Signature

public void put(String key, Object value, Integer ttlSecs)

Parameters

key
Type: String
A case-sensitive string value that uniquely identifies a cached value.

value
Type: Object
The value to store in the cache. The cached value must be serializable.

ttlSecs
Type: Integer
The amount of time, in seconds, to keep the cached value in the cache.

Return Value
Type: void

What is the default behavior when a put method that does not include a ttlSecs value is used for the two cases of:

  • OrgPartioon
  • SessionPartition

(FYI How to get time left on OrgPartition from Platform Cache?)

5

24 hours as per docs for Org Cache. No mention for session cache, probably because the session can expire any time?

enter image description here

  • 2
    Thanks Pranay, I missed that. – Keith C Jan 27 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.