According to the REST protocol, is it correct to do any write operation from the controller handling a GET call.
For example, I have a GET API that gets me some data, but in order to get that data, I have to call a separate third-party service. What I want is to cache/ store this data in my database so that next time I do not have to call the third-party API. But in order to store the entry in my database I will have to do a write operation, the question is, is it technically correct according to the REST API protocol.
Any other alternatives to implement the same flow are most welcome