Length calculations can sometimes be expensive. For example, if I have something that is already JSON encoded but cache the decoded version then I have to encode it again just to get the length even though I already have the string version to get the length on. Although the length of JSON versus the length of memory is a loose approximation it's close enough for complex data.
A length parameter would go after max age and be used if set.
It is currently possible to my knowledge to set the length to a variable and the length function to take that for the item about to be set, though it's not the most elegant thing.
Length calculations can sometimes be expensive. For example, if I have something that is already JSON encoded but cache the decoded version then I have to encode it again just to get the length even though I already have the string version to get the length on. Although the length of JSON versus the length of memory is a loose approximation it's close enough for complex data.
A length parameter would go after max age and be used if set.
It is currently possible to my knowledge to set the length to a variable and the length function to take that for the item about to be set, though it's not the most elegant thing.