google / martian

Martian is a library for building custom HTTP/S proxies
Apache License 2.0
2k stars 247 forks source link

Certificate cache TTL #320

Open hazcod opened 3 years ago

hazcod commented 3 years ago

Hi! Thank you for the project.

I've noticed that the generated MITM certificates are never purged from memory. So in case of a long running instance of martian, the memory usage would only increase.

I think it would be nice to be able to use the Certificate Validity (SetValidity) as a TTL on the certificate map key.

bramhaghosh commented 2 years ago

This seems reasonable - I'd be happy to review a PR that adds in this behavior.