ArgusCache details

This page explains how ArgusCache works in detail and what functionality ArgusCache contains.

  1. What is ArgusCache?

    ArgusCache is a tool which should allow you to speed up the execution of your external assets on your live systems. Especially understanding what happens on your system is very interesting, since mostly that information is key to tuning a system. With ArgusCache provides you with the following functionality:

    • AC introspects, what external resources have been called on your server
    • You will retrieve the information, whether the data returned for each individual external resource has changed for a certain amount of time
    • You will see information on how many times has the external resource been called without the result being different
    • You can see whether it would be worth caching that external resource call?
    • AC also allows you to instantly cache that resource and speed up your system on the spot WITHOUT you having to touch the source code.
  2. How does ArgusCache work?

    ArgusCache is a server module which hooks directly into Lucee and monitors the following six external resources:

    • file
    • function
    • http
    • query
    • [include]
    • [webService]

    The invocation of the Lucee caching system is happening by activating the default caching in the Application.cfc like follows:

    //this.cachedwithin["function"] = "smart";
    this.cachedwithin["http"] = "smart";
    this.cachedwithin["query"] = "smart";
    this.cachedwithin["include"] = "smart";
    this.cachedwithin["file"] = "smart";
    this.cachedwithin["invoke"] = "smart";

    The above settings are implemented with the Lucee notation, which allows you to define default attributes for tags in Lucee. This also means, that ArgusCache will NOT introspect already cached resources. From the above statements in the Application.cfc the function caching is uncommented, since at the moment it can have quite a big impact on performance when analyzing functions in the current state of the beta. Sometimes in an objectoriented approach, there are thousands of function calls in one single request. Therefore you should approach it with care. After you have installed ArgusCache, you also need to activate the introspection by setting the above defaults for caching.

    ArgusCache consists of two parts:

    1. The Analysis
    2. The caching

    The analysis
    When you have turned on the default caching in the Application.cfc as described above, all uncached elements will be analyzed and eventually marked as entries. An entry is a result of such an external call which potentially is worth caching since it has not changed for at least 1 minute (or whatever you have set in your ArgusCache settings) when called with the same params. For every entry params a hash is calculated and an entry is generated. Then the call is been done and the result is analyzed and a hash is generated for the result.

    If now the entry and result hash do not change for subsequent calls larger than one minute (or defined), the potential entry is now turning into a real entry which potentially could be cached. The entry params differ from type to type (6 types see above).

    The caching
    Once you have identified all the entries or the potential entries, you can easily cache them by navigating into the details of the analyzed entries and select which ones you want to cache and which ones not. You can also decide to ignore the analysis for certain patterns. This is necessary for keeping the performance of the server high.

    The decision on whether to cache an element or not is completely up to you. There is no automatic caching yet implemented in ArgusCache