Caching

Enable caching in the Server Settings > Cache / Connections section of Corda Server™ Administrator. Simply enter the desired cache size (in images) in the Cache Size box.

When caching is enabled, Corda Server stores the server request string and the generated image in a cache. When the same request is received, Corda Server returns the previously generated image instead of generating a new one. This process is very fast because it doesn't require disk access or processing time.

Even if there is a possibility of thousands of different variations on a certain graph, it is useful to have a cache size of around 100 to 1000 images if certain graphs or maps are viewed more frequently than others.

If you load data from a file with either the Corda® Embedder or PCScript while caching is enabled, Corda Embedder checks the timestamp of the file that it loads. If the timestamp hasn't changed, the cached image is used. Otherwise, a new image with the updated data is generated.

The cache size can be as large as you want it to be. However, keep in mind that the cache uses RAM and not disk space. Cache sizes of 100 to 1000 images are typical.

When the cache reaches its maximum capacity, the oldest image is dropped out of the cache.

If the data being graphed is never or rarely the same, using the cache is not recommended. Disable the cache by setting Cache Size to 0. You can also specify that a certain image is not to be cached by using either the useCache Corda Embedder attribute, or the @_DONTCACHE server command (this also instructs the browser not to cache the image).