Documentation

Create Cache

Create or update a cache entry. This endpoint allows you to specify the cache duration, a unique key for the cached data, and the data to be cached.

Method: POST
URL:https://api.litecache.app/create_cache
Parameters:
 -cache_time: Duration for caching. Accepted values are 1, 5, 15, 30 minutes.
 -key: Unique key for the cached data.
Request Body:
 -data: Data to be cached.
Responses:
 -200: Successful Response
 -404: Authorization Error
 -422: Validation Error
 -429: Too Many Requests

Read Cache

Retrieve cached data using the specified cache duration and key. If the cache exists for the given key and duration, it will return the cached data. Otherwise, it will return null.

Method: GET
URL:https://api.litecache.app/read_cache/{cache_time}/{key}
Parameters:
 -cache_time: Duration of the stored cache. Accepted values are 1, 5, 15, 30 minutes.
 -key: Unique key for the cached data.
Responses:
 -200: Successful Response
 -404: Authorization Error
 -422: Validation Error
 -429: Too Many Requests