Advanced Guide
App Cache
Learn how to use the App cache.
When a request is made, it returns application information and caches it in the Application object itself. This is useful if you need to access this information again in a relatively short time, meaning it’s not worth making a new API request for updated data. In such cases, you can access Application.cache
.
Making requests without updating the cache
If, for some reason, you don’t want to update the cache when making a request, you can pass the update_cache=False
argument.
If the arguments you pass to cache.update
are not an instance of StatusData
, LogsData
, or BackupData
, a SquareException
error will be raised.
Manually clearing the cache
You can manually clear the cache using cache.clear
.
Manually updating the cache
You can also manually update it using the cache.update
method.
Was this page helpful?