cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject [C2] Proposal Back-End Caching mechanism
Date Thu, 25 Jan 2001 16:09:22 GMT
I want to propose a caching solution that many CPU
manufacturers use in their caching implementations.

Basically we have what is known as a "smart" cache.
The cache is what the sitemap uses to get the various
stages, and is transparent to any component development.

Below is an ASCII Sequence Diagram as to how a request
is processed using this functionality.



Sitemap        Cache       Generator   Transformer  Serializer   Reader
   | generate()  |             |            |           |          |
   +------------>+-| isValid() |            |           |          |
   |             |<|           |            |           |          |
   |     yes     |     no      |            |           |          |
   |<------------+------------>|            |           |          |
   | transform() |                          |           |          |
   +------------>+-| isValid()              |           |          |
   |             |<|                        |           |          |
   |     yes     |          no              |           |          |
   |<------------+------------------------->|           |          |
   | serialize() |                                      |          |
   +------------>+-| isValid()                          |          |
   |             |<|                                    |          |
   |     yes     |                  no                  |          |
   |<------------+------------------------------------->|          |
   |    read()   |                                                 |
   +------------>+-| isValid()                                     |
   |             |<|                                               |
   |     yes     |                         no                      |
   |<------------+------------------------------------------------>|
   |

That way, for each stage, the Cache handles the Validation
(and Validators).  If a resource is stale, it uses the end
Component to refresh it.  Also, the Cache is set up so that
the Validators are assigned not at the pipeline stage, but
at the initialization stage:

<map:generators default="file">
  <map:generator name="file" validator="FileCurrentValidator"/>
</map:generators>

I think this is the most desirable way of doing it.

Mime
View raw message