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?)