You need to sign in to do that
Don't have an account?
Samuel Wolfe
Session cache is not persisting
We are trying to store a value in a session cache partition. When I add values to the session cache, appears to be stored successfully for the duration of 1 debug log.
However when I list all the data from the session cache, it appears to be cleared every time a new debug log is started. We never explcitily clear the session cache.
Any idea why this could be happening?
Here is the code where I store the value in the partition:
This successfully stores and retrieves the data through the duration of 1 debug log. But when I initiate the code again (aka by clicking a link to an object), it is no longer there.
5MB has been allocated to the session cache partition.
However when I list all the data from the session cache, it appears to be cleared every time a new debug log is started. We never explcitily clear the session cache.
Any idea why this could be happening?
Here is the code where I store the value in the partition:
Cache.SessionPartition apicache = Cache.Session.getPartition('local.APICache.'+hash); apicache.put(hash, json);Here is how we retrieve data from the partition
Cache.SessionPartition apicache = Cache.Session.getPartition('local.APICache.'+hash);
This successfully stores and retrieves the data through the duration of 1 debug log. But when I initiate the code again (aka by clicking a link to an object), it is no longer there.
5MB has been allocated to the session cache partition.
Best Answer chosen by Samuel Wolfe
Samuel Wolfe
Update: So it looks like there is a delay after changing your cache partition size. The cache won't start working until a while after. Also in general it seems to stop working again at random.