Caching Token in SOAP-based Web Service

Julio Bello 221 Reputation points
2021-02-25T05:05:00.987+00:00

I developed a SOAP-based web service for internal consumption. It takes a SOAP-based web request and converts it to a JSON-based external, third-party RESTful web API request. It then takes the JSON-based external, third-party RESTful web API response and converts it to a SOAP-based web response for internal consumption. The JSON-based external, third-party RESTful web API request requires a token. The token is requested from the JSON-based external, third-party RESTful web API. The token is then sent along with the JSON-based external, third-party RESTful web API request. The token is good for four hours. I wish to cache the token and retrieve it for all subsequent JSON-based external, third-party RESTful web API requests. I only need to refresh the token when it expires.

How do I cache the token for all JSON-based external, third-party RESTful web API operations and for all subsequent requests?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,368 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,251 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,231 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
294 questions
{count} votes