Imago Cache Design Notes
The Imago caching engine is a fairly simple construct. After
each step in the pipeline the result is cached provided that the result
is not identified as being dynamic or has not already changed. The
cache uses the concept of a Watchable item. Each Watchable item has the
responsibility of determining when it has expired. Each Watchable item
may comprise several Watchable items. Once a watchable item has expired
the cached resource is removed from the cache. The net result is that
when a request is made of Imago the cache is searched if the object is
in the cache and has not expired it is returned. If the object is not
found then the pipeline is constructed. At each step in the pipeline
the cache is checked to see if the result of the step is a valid cache
entry. If so it is returned and the processing is started from there.
The example below should make this clear.
If T2.xsl had been changed since it the (A.xml:T2.xsl:T2.xsl) entry was cached, it would be labeled as expired and regenerated. Thus the T1 level would be called. It is important to understand the impact of dynamic data on the process. Transformations should be constructed such that dynamic data is added as late as possible. In a more complex example a single XSL file could include multiple XSL and XML files as noted below. In this scenario step T2.xsl is cachable only if all the files it comprises are cachable. It should also be noted that T2.xsl, T2a.xsl, T2b.xsl, B.xml and C.xml will also exist in the cache if they are not dynamic. The documents that comprise T2.xsl may be included using any available XML document include process.
|