Viewing Bright Cache Data

Bright Clients that use PHP Connect for Bright include an API cache that optimizes duplicate requests in such a way that additional API calls are not generated.

This is exposed to the browser in bright.js through Bright Cache Data statistics. From your browser's developer tools:

-> Bright.cacheData
11:41:34.758 {num_cache_hits: 9, num_cache_misses: 13, total_time: 0.667343}

Fields are:

  • num_cache_hits: API calls that resulted in the cached data being returned.
  • num_cache_misses: Unique API calls that did not use the Bright API cache
  • total_time: Time in seconds the server-side client spent waiting for a response from the Bright API.