PHP Classes

File: docs/06-config.md

Recommend this page to a friend!
  Classes of Scott Arciszewski   Chronicle   docs/06-config.md   Download  
File: docs/06-config.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Chronicle
Append arbitrary data to a storage container
Author: By
Last change:
Date: 1 year ago
Size: 1,287 bytes
 

Contents

Class file image Download

Chronicle Configuration

HTTP Response Caching

Caching was implemented since version 1.2.0.

If your Chronicle instance is receiving a lot of traffic, it may be beneficial to cache HTTP responses for a few seconds.

To enable caching, first you will need to install the Memcached extension from PECL.

(There are instructions available online for installing Memcached on Debian. If you need instructions for your operating system, please inquire with their support team.)

Next, edit local/settings.json and set "cache" to an integer greater than 0 to cache responses for a given number of seconds.

It's recommended to set this to a value greater than 1 but less than 60. Some applications may dislike responses that are more than 1 minute old.

{
    // ...
    "cache": 15,
    // ...
}

Pagination

Pagination was implemented since version 1.2.0.

To enable pagination, edit local/settings.json and set "paginate-export" to an integer value greater than 0.

{
    // ...
    "paginate-export": 15,
    // ...
}

If you set it to false, null, or 0, it will treat it as disabled. If you erase the key from the JSON file, it will also disable pagination.