[jira] [Commented] (COCOON3-102) The org.apache.cocoon.sax.component.XIncludeTransformer is not cacheable

2012-07-03 Thread JIRA

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

Francesco Chicchiriccò commented on COCOON3-102:


Removed the patch I proposed for workaround-ing the cache issues, since I am 
about to commit a fix working in the direction indicated by Javier.

 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


 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




[jira] [Commented] (COCOON3-102) The org.apache.cocoon.sax.component.XIncludeTransformer is not cacheable

2012-07-03 Thread Hudson (JIRA)

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

Hudson commented on COCOON3-102:


Integrated in Cocoon-trunk #205 (See 
[https://builds.apache.org/job/Cocoon-trunk/205/])
[COCOON3-102] Applying (and reworking a bit) the proposed patch for 
COCOON3-100, replacing URLCacheKey with URLConnectionUtils.getLastModified() 
(Revision 1356609)

 Result = SUCCESS
ilgrosso : http://svn.apache.org/viewvc/?view=revrev=1356609
Files : 
* 
/cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/JAXBGenerator.java
* 
/cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/ObjectCacheKey.java
* 
/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/CachedCacheKey.java
* 
/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/CachedCacheValue.java
* 
/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/CompoundCacheKey.java
* 
/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/ObjectCacheKey.java
* 
/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/TimestampCacheKey.java
* 
/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/URLListCacheKey.java
* 
/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java
* /cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap
* 
/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SchemaProcessorTransformer.java
* 
/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XIncludeTransformer.java
* 
/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XMLGenerator.java
* 
/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java
* 
/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/util/URLUtils.java
* 
/cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/component/FileReaderComponent.java
* 
/cocoon/cocoon3/trunk/cocoon-stringtemplate/src/main/java/org/apache/cocoon/stringtemplate/StringTemplateGenerator.java
* 
/cocoon/cocoon3/trunk/cocoon-stringtemplate/src/main/java/org/apache/cocoon/stringtemplate/StringTemplateReader.java


 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


 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




[jira] [Commented] (COCOON3-102) The org.apache.cocoon.sax.component.XIncludeTransformer is not cacheable

2012-06-21 Thread JIRA

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

Francesco Chicchiriccò commented on COCOON3-102:


Ok, I had a closer look to your patches in COCOON3-100.

Basically - correct me if I'm wrong - we are talking about two different things 
here:

 1. CachedCacheKey as way to solve the problem I describe above re-opening this 
issue: you are using a separate, local, Cache object for making the main Cache 
object able to recognize that there is an existing CacheKey during subsequent 
lookups for IncludeTransformer - this could apply without modifications to 
XIncludeTransformer as well.
CachedCacheKey could even use a simple singleton Map for this job - not 
necessarily SimpleCache, isn't it?

 2. a better handling for lastModified (and ETag) stuff that would involve 
SourceValidity migration from C2.X
This will involve changing a lot of things as you say: how do you see 
URLUtils.getLastModified() in this respect? I've recently changed all caching 
components dealing with URLs to use this method.

Anyway, I'd like to make C3 caching mechanism as strong as possible, so I'd be 
happy to help you (and Thorsten) in this process.

 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




[jira] [Commented] (COCOON3-102) The org.apache.cocoon.sax.component.XIncludeTransformer is not cacheable

2012-06-20 Thread Javier Puerto (JIRA)

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

Javier Puerto commented on COCOON3-102:
---

You are right, with current implementation it's very difficult to achieve this 
tasks but it's possible with the patch I did for COCOON3-100. Anyway, I didn't 
commited yet because I'm not entirely happy with the URLCacheKey 
implementation, the expires that you commented could be used in that class. ATM 
I don't have enough time to work with Cocoon 3 until this weekend so if you 
have, you could take a look and improve it.

 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




[jira] [Commented] (COCOON3-102) The org.apache.cocoon.sax.component.XIncludeTransformer is not cacheable

2012-06-20 Thread Javier Puerto (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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




[jira] [Commented] (COCOON3-102) The org.apache.cocoon.sax.component.XIncludeTransformer is not cacheable

2012-06-07 Thread Hudson (JIRA)

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

Hudson commented on COCOON3-102:


Integrated in Cocoon-trunk #194 (See 
[https://builds.apache.org/job/Cocoon-trunk/194/])
[COCOON3-102] Using CompoundCacheKey with all URLs to be xincluded 
(Revision 1347679)

 Result = SUCCESS
ilgrosso : http://svn.apache.org/viewvc/?view=revrev=1347679
Files : 
* 
/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XIncludeTransformer.java


 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


 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