rookLab / react-component-caching

Speedier server-side rendering with component caching in React 16
388 stars 26 forks source link

Ability to set cache expiry time per component #47

Closed MikeyParton closed 5 years ago

MikeyParton commented 6 years ago

I have a use case where different components require different cache expiry times. It doesn't look like this is currently possible as memlife is set once for the entire app when you call renderToString. Do you think it would be possible to use this as a default but add the ability to override on each cached component with a prop as needed ?