I am developing a backend custom module for integration with an external API that requires OAuth tokens. When I get an OAuth token, it is valid for one hour (3600 seconds). I want to store this token and its timestamp in the cache (write to cache). On next invocation, I want to reuse the token (read from cache) and only refresh it if is expired.
How can I write to and read from cache in a custom module in the backend?
How can I write to and read from cache in a custom module in the backend?
Comment