Signup Login

Result Page Caching

Some of our methods produce large result sets, comprising hundreds of records. To make this large result list usable to their end clients, developers will probably wish to present the records in shorter pages of results. In order to achieve this, it would be necessary to store the entire result set on your web server, either in a memory cache, or a short-lived database cache.

T2A offers a transparent page cache on methods that can produce large result sets. The XML, JSON and SOAP APIs will store the complete result in a cache on your behalf (only usable by you) for 60 minutes, to allow easy paging for your final clients. In order to use the cache, you must set both of the following parameters:-

  • records_per_page - specifies the number of records to be displayed on a page.
  • page_number - specify the page number to be displayed. This is a zero-based integer.

Those methods that offer page caching include the following in their result:-

  • total_records - the total number of records in the result set.
  • page_number - the current page number, a zero based integer.

Next: Common XML, JSON and SOAP Error Codes