You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function could receive the data ouput from the work function given and return a ttl number for the psetex in _pushData.
This would cover many cases, but still not the HTTP example in the event where the resulting data is the document itself but the TTL comes from the headers.
The text was updated successfully, but these errors were encountered:
Whatever route, WrapConfig should definitely include a ttl option so we can override the global value per call.
To solve the issue in the HTTP example, though, we could add a booleanWrapConfig option which denotes that the return value of the passed function is a new interface which returns a ttl and data.
interfaceWrapResult{data: any;ttl?: number;}
This feels shit, though, as it requires people to repurpose functions.
Maybe adding both this and a getTtl function in WrapConfig would be good? That way the user could choose the less invasive option.
This function could receive the data ouput from the
work
function given and return attl
number for thepsetex
in_pushData
.This would cover many cases, but still not the HTTP example in the event where the resulting data is the document itself but the TTL comes from the headers.
The text was updated successfully, but these errors were encountered: