Skip to content

Latest commit

 

History

History

CacheDemoApi

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Demo API to demonstrate caching of OAuth Token received from External API and use it for subsequent calls.

API Flow

Client --> Apigee API secured by OAuth (CacheDemoApi) --> External API secured by OAuth (ExternalApi)

Dependent APIs

  1. 2-Legged-OAuth - API to get OAuth token for CacheDemoAPI.
  2. ExternalOAuthApi - Demo OAuth API for external OAuth.
  3. ExternalApi - Dmeo API for external API secured with OAuth.

Flow for Apigee API Caching.

  1. LookupCache policy is used to look for access token before calling external OAuth API.
  2. If cache returns null, call to external OAuth API is made.
  3. Access token from above step in response is cached using PopulateCache policy.
  4. If cache returns value, same is used and call to External OAuth API is skipped.

Note: Cache expiration time must be set less than token exipres_in value.