How to stop a nonce from being cached in an inline script, or alternatives to regenerate it if expired?

How to stop a nonce from being cached in an inline script, or alternatives to regenerate it if expired?