Caching

Auto API features several different caching methods which can easily be exchanged or disabled depending on sever configuration or requirements.

Page caching

Page Caching is used to cache the results of API get, tables, and fields requests using the url as a key. By default this cache expires every 60 minutes. Page caching uses FileCache as storage by default, but this can be replaced with any other supported cache system within Auto API.

Rate limit caching

API Rate limits for each individual client are stored in cache. For demo purposes Auto API's rate limiter uses DBCache, however this can be switched out for RedisCache which would be better-suited for high-traffic applications due to its faster read/writes.

Caching Systems

The following are the caching systems that currently built for Auto API. Every cache has a common interface allowing caches to be easily changed where needed and to provide common functionality, such as an expiry time or garbage collection.

FileCache

FileCache can store text data in any file format and the encoding of that data is left to whichever internal system is using the file cache. For performance file caches are automatically spread among multiple folders.

DbCache

DBCache can store text data in an SQL database and can be generally thought of as an alternative to FileCache. It may be better-suited for high-traffic applications than FileCache.

RedisCache

RedisCache is a fast in-memory cache storage system best suited for frequent read/writes. Ideal for heavy read/writes, ram storage space allowing.

APCCache

Similar to RedisCache, however this cache shares memory across the same process it runs in, which may not be suitable for some use cases or server configurations.