cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javier Puerto (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COCOON3-102) The org.apache.cocoon.sax.component.XIncludeTransformer is not cacheable
Date Wed, 20 Jun 2012 16:16:44 GMT

    [ https://issues.apache.org/jira/browse/COCOON3-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397606#comment-13397606
] 

Javier Puerto commented on COCOON3-102:
---------------------------------------

The patch is working but the problem is that COCOON3-30 is blocking the issue. Summarizing:

As you pointed, I use a similar approach as old Cocoon 2.x does. I've created a CachedCacheKey
that will store the CacheKey for a given key. First time IncludeTransformer is executed, the
CacheKey is created and stored in the CachingCacheKey object in a Cache (SimpleCache implementation)
with a given key (usually the request URL). Next time, that Cocoon ask for the CacheKey, it
will be checked with the cached one.

The problem is the following, we use double check for caching: etag and last modified. If
etag matches, we don't check the last-modified value (it's cached), otherwise Cocoon check
the last-modified (here COCOON3-30 is breaking the caching). In the sample block for IncludeTransformer
we have the same file included twice, but the difference is that one use the file:// protocol
and the other uses the servlet:// protocol. URLCacheKey will check the etag and last-modified
values, but the file:// implementation don't provide the etag information so Cocoon use last-modified
as fallback and finally ParameterCacheKey breaks the cache.

You can test it easily with the sample block and changing the ParameterCacheKey value of last-modified
to 0 for example, this way will work at least for testing. I had some improvements in local
but I'm still not happy with the URLCacheKey impl.

I've commented the problem to Thorsten and he suggest that maybe we could migrate the SourceValidity
from old Cocoon implementation. IMO the caching system from old Cocoon was OK, so I'm agree
with him but means that we should have to change a lot of things. WDYT?
                
> The org.apache.cocoon.sax.component.XIncludeTransformer is not cacheable
> ------------------------------------------------------------------------
>
>                 Key: COCOON3-102
>                 URL: https://issues.apache.org/jira/browse/COCOON3-102
>             Project: Cocoon 3
>          Issue Type: Improvement
>          Components: cocoon-sax
>    Affects Versions: 3.0.0-alpha-3
>            Reporter: Simone Tripodi
>            Assignee: Francesco Chicchiriccò
>             Fix For: 3.0.0-beta-1
>
>         Attachments: COCOON3-102.patch
>
>
> The org.apache.cocoon.sax.component.XIncludeTransformer is not a cacheable pipeline component,
it would be great to implement it as cacheable

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message