You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorg Heymans <jh...@domek.be> on 2003/12/12 12:59:45 UTC
svg content caching with aggregated pipelines
Hi,
I am trying to setup a fully caching SVG pipeline. For this i wrote a
cachingrequestgenerator that caches based on requestpath and
requestparameters passed. (generateValidity() returns
NOPCacheValidity.CACHE_VALIDITY, generateKey() loops over the request
object and builds a cache string)
Now to test i have two tabs in the browser, both pointing to the same
svg template but with different requestparameters. I can load the first
one and it will deliver cached content upon subsequent browser refresh.
But by loading the second template, the cache of the first gets
invalidated somehow.
Any thoughts? My pipeline is setup with aggregates, could this cause probs?
Jorg
core.log output:
DEBUG (2003-12-12) 12:51.15:653 [core.stream-pipeline]
(/app/mysvg.svg) http8080-Processor4/CachingStreamPipeline: Compared
cached validity 'Aggregated Validity[TimeStamp
Validity[1071227970000]:TimeStamp Validity[1071226902000]]' with new
validity 'Aggregated Validity[TimeStamp
Validity[1071227970000]:TimeStamp Validity[1071226902000]]' : valid
DEBUG (2003-12-12) 12:51.15:654 [core.stream-pipeline]
(/app/mysvg.svg) http8080-Processor4/CachingStreamPipeline: Compared
cached validity 'Aggregated Validity[TimeStamp
Validity[1071227302000]:TimeStamp Validity[551343310211496822]]' with
new validity 'Aggregated Validity[TimeStamp
Validity[1071227302000]:TimeStamp Validity[5075868281548934821]]' : changed
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: svg content caching with aggregated pipelines
Posted by Jorg Heymans <jh...@domek.be>.
digging further...
Which class is responsible for generating the validity of a full
pipeline? I have strong evidence that the <map:part
src="cocoon:/aggregate/{1}.svg"/> from snippet below is getting a new
timestamp validity on subsequent invocations, thus invalidating the cache.
Also: which class is serializing the cache to disk?
thanks
Jorg
Jorg Heymans wrote:
> my pipeline in case it's relevant.
>
> <map:match pattern="*.svg">
> <map:aggregate element="aggregation">
> <map:part src="file://{defaults:SVGFILES}{1}.svg"/>
> <map:part src="cocoon:/aggregate/{1}.svg"/>
> </map:aggregate>
> <map:transform src="stylesheets/make_svg.xsl"/>
> <map:serialize type="svg2png"/>
> </map:match>
>
> <map:match pattern="aggregate/*.svg">
> <map:generate type="cachingrequest"/>
> <map:serialize type="xml"/>
> </map:match>
>
>
> Jorg Heymans wrote:
>
>> Hi,
>>
>> I am trying to setup a fully caching SVG pipeline. For this i wrote a
>> cachingrequestgenerator that caches based on requestpath and
>> requestparameters passed. (generateValidity() returns
>> NOPCacheValidity.CACHE_VALIDITY, generateKey() loops over the request
>> object and builds a cache string)
>>
>> Now to test i have two tabs in the browser, both pointing to the same
>> svg template but with different requestparameters. I can load the
>> first one and it will deliver cached content upon subsequent browser
>> refresh. But by loading the second template, the cache of the first
>> gets invalidated somehow.
>>
>> Any thoughts? My pipeline is setup with aggregates, could this cause
>> probs?
>>
>> Jorg
>>
>> core.log output:
>>
>> DEBUG (2003-12-12) 12:51.15:653 [core.stream-pipeline]
>> (/app/mysvg.svg) http8080-Processor4/CachingStreamPipeline: Compared
>> cached validity 'Aggregated Validity[TimeStamp
>> Validity[1071227970000]:TimeStamp Validity[1071226902000]]' with new
>> validity 'Aggregated Validity[TimeStamp
>> Validity[1071227970000]:TimeStamp Validity[1071226902000]]' : valid
>>
>> DEBUG (2003-12-12) 12:51.15:654 [core.stream-pipeline]
>> (/app/mysvg.svg) http8080-Processor4/CachingStreamPipeline: Compared
>> cached validity 'Aggregated Validity[TimeStamp
>> Validity[1071227302000]:TimeStamp Validity[551343310211496822]]' with
>> new validity 'Aggregated Validity[TimeStamp
>> Validity[1071227302000]:TimeStamp Validity[5075868281548934821]]' :
>> changed
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: svg content caching with aggregated pipelines
Posted by Jorg Heymans <jh...@domek.be>.
my pipeline in case it's relevant.
<map:match pattern="*.svg">
<map:aggregate element="aggregation">
<map:part src="file://{defaults:SVGFILES}{1}.svg"/>
<map:part src="cocoon:/aggregate/{1}.svg"/>
</map:aggregate>
<map:transform src="stylesheets/make_svg.xsl"/>
<map:serialize type="svg2png"/>
</map:match>
<map:match pattern="aggregate/*.svg">
<map:generate type="cachingrequest"/>
<map:serialize type="xml"/>
</map:match>
Jorg Heymans wrote:
> Hi,
>
> I am trying to setup a fully caching SVG pipeline. For this i wrote a
> cachingrequestgenerator that caches based on requestpath and
> requestparameters passed. (generateValidity() returns
> NOPCacheValidity.CACHE_VALIDITY, generateKey() loops over the request
> object and builds a cache string)
>
> Now to test i have two tabs in the browser, both pointing to the same
> svg template but with different requestparameters. I can load the first
> one and it will deliver cached content upon subsequent browser refresh.
> But by loading the second template, the cache of the first gets
> invalidated somehow.
>
> Any thoughts? My pipeline is setup with aggregates, could this cause probs?
>
> Jorg
>
> core.log output:
>
> DEBUG (2003-12-12) 12:51.15:653 [core.stream-pipeline]
> (/app/mysvg.svg) http8080-Processor4/CachingStreamPipeline: Compared
> cached validity 'Aggregated Validity[TimeStamp
> Validity[1071227970000]:TimeStamp Validity[1071226902000]]' with new
> validity 'Aggregated Validity[TimeStamp
> Validity[1071227970000]:TimeStamp Validity[1071226902000]]' : valid
>
> DEBUG (2003-12-12) 12:51.15:654 [core.stream-pipeline]
> (/app/mysvg.svg) http8080-Processor4/CachingStreamPipeline: Compared
> cached validity 'Aggregated Validity[TimeStamp
> Validity[1071227302000]:TimeStamp Validity[551343310211496822]]' with
> new validity 'Aggregated Validity[TimeStamp
> Validity[1071227302000]:TimeStamp Validity[5075868281548934821]]' : changed
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org