Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Set cache expiration time according to server response field value

Hello there!

I have few endpoints and by default response cache expiration time set to 10 minutes.

Also, I have /employee endpoint and I want in this particular case change cache expiration time to 2 minutes if in a server response "vacation" field holds true value.

Could I achieve it using only policies or I have to use scripts with node.js? How can I rewrite the default expiration time?

0 3 368
3 REPLIES 3