-
Notifications
You must be signed in to change notification settings - Fork 98
Caching
The PayPal PHP SDK now has the ability to cache access tokens for multiple request uses. Generally, an access token is valid for approximately 15 min to 8 hours depending on PayPal security settings. By default, however, PHP requests a new access token each time a new process/request is made.
When caching is enabled, the PayPal PHP SDK stores the access token in a file provided by the cache.FileName
option. If the cache.FileName
option is omitted or empty, the SDK uses the constant $CACHE_PATH
value in PayPal\Cache\AuthorizationCache
.
-
cache.enabled
- Options : true, false
- Enables caching if true
-
cache.FileName
- When using a relative path, the cache file is created relative to the .php file that is the entry point for this request. You can also provide an absolute path.
PLEASE NOTE
We encourage you to take advantage of this feature which can reduce the number of calls by almost 50% for most use cases. Please make sure you have proper write permissions to the caching directory on your hosting server.
Getting Started
Using Our SDK
Configurations
Extras
External Links