Re: Expiration Attribute in Pipeline Efficient aggregation

2002-09-06 Thread Martin Lüthi

Ivelin

Thank you for your hint. Do you mean something like

map:generate type=xpathdirectory src=docs/myfiles#/Body
   map:parameter name=expires value=100/
/map:generate

This seems not to be cached and the directory listing gets created every
time. 

Martin

Ivelin Ivanov [EMAIL PROTECTED] writes:

 Cocoon 2.1 supports an extra attribute in the pipeline,
 which specifies the expiration header in the http response.
 This should allow temporary caching of the result.
 I am not sure where this is documented though.

-- 
Martin Lüthi [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Expiration Attribute in Pipeline Efficient aggregation

2002-09-06 Thread Vadim Gritsenko

Ivelin Ivanov wrote:

Cocoon 2.1 supports an extra attribute in the pipeline,
which specifies the expiration header in the http response.


It serves different purpose; other client won't get cached result, and 
refresh also won't get cached result.

Martin, you still need to exted generator to make it cacheable, with 
delta timestamp (simplest approach) or any other way.

Vadim



This should allow temporary caching of the result.
I am not sure where this is documented though.


- Original Message -
From: Martin Lüthi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 05, 2002 8:47 AM
Subject: Re: Efficient aggregation


Thank you for your hint. I just tried out XPathDirectoryGenerator
(scratchpad)
which essentially does what I need, but is a lot less messy than my initial
approach. However, also these results seem not to get cached... Presumably I
should save the result with something like a SourceWritingTransformer, and
only rebuild the file after explizit request.


Martin

Nick Airey [EMAIL PROTECTED] writes:

  

After 1 minute of looking, it seems that the DirectoryGenerator is not
cacheable.

So it is going to re-read the directory every time you hit the pipeline.
Your Xincluded pieces might be cacheable, however. For instance, the
FileGenerator *is* cacheable (if you are using it).


If you can live with refreshing the cached directory every x seconds (or
miliseconds), and you can write some java, you could extend the
DirectoryGenerator to make a caching directory generator, by
implementing interface Cacheable and implementing generateKey() and
generateValidity().  The generateValidity() method would return a
DeltaTimeCacheValidity instance set to the caching time.


Regs,
Nick.



--
Martin Lüthi [EMAIL PROTECTED]

  





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Expiration Attribute in Pipeline Efficient aggregation

2002-09-06 Thread Ivelin Ivanov


AFAIK,
If you front Cocoon with Apache (ProxyCache enabled) or if any other proxy
server is between your browser and Cocoon, then the expires attribute is of
significant help.
Only I don't remember the syntax when used in the pipeline.
Can someone point us to a document?

However if the browser is hitting Cocoon directly, then Vadim is right. It
would make sence to allow a cache timeout parameter to be allowed in the
pipeline for the dirGenerator.


- Original Message -
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 06, 2002 8:01 AM
Subject: Re: Expiration Attribute in Pipeline  Efficient aggregation


Ivelin Ivanov wrote:

Cocoon 2.1 supports an extra attribute in the pipeline,
which specifies the expiration header in the http response.


It serves different purpose; other client won't get cached result, and
refresh also won't get cached result.

Martin, you still need to exted generator to make it cacheable, with
delta timestamp (simplest approach) or any other way.

Vadim



This should allow temporary caching of the result.
I am not sure where this is documented though.


- Original Message -
From: Martin Lüthi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 05, 2002 8:47 AM
Subject: Re: Efficient aggregation


Thank you for your hint. I just tried out XPathDirectoryGenerator
(scratchpad)
which essentially does what I need, but is a lot less messy than my initial
approach. However, also these results seem not to get cached... Presumably
I
should save the result with something like a SourceWritingTransformer, and
only rebuild the file after explizit request.


Martin

Nick Airey [EMAIL PROTECTED] writes:



After 1 minute of looking, it seems that the DirectoryGenerator is not
cacheable.

So it is going to re-read the directory every time you hit the pipeline.
Your Xincluded pieces might be cacheable, however. For instance, the
FileGenerator *is* cacheable (if you are using it).


If you can live with refreshing the cached directory every x seconds (or
miliseconds), and you can write some java, you could extend the
DirectoryGenerator to make a caching directory generator, by
implementing interface Cacheable and implementing generateKey() and
generateValidity().  The generateValidity() method would return a
DeltaTimeCacheValidity instance set to the caching time.


Regs,
Nick.



--
Martin Lüthi [EMAIL PROTECTED]







-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Expiration Attribute in Pipeline Efficient aggregation

2002-09-06 Thread Vadim Gritsenko

Ivelin Ivanov wrote:

AFAIK,
If you front Cocoon with Apache (ProxyCache enabled) or if any other proxy
server is between your browser and Cocoon, then the expires attribute is of
significant help.
Only I don't remember the syntax when used in the pipeline.
Can someone point us to a document?


IIRC, it was said that syntax is similar to apache's mod_expires. Examples:
now
now plus 10 minutes
access
access plus 2 years

See AbstractProcessingPipeline.java.parseExpires().

Vadim


However if the browser is hitting Cocoon directly, then Vadim is right. It
would make sence to allow a cache timeout parameter to be allowed in the
pipeline for the dirGenerator.


- Original Message -
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 06, 2002 8:01 AM
Subject: Re: Expiration Attribute in Pipeline  Efficient aggregation


Ivelin Ivanov wrote:

  

Cocoon 2.1 supports an extra attribute in the pipeline,
which specifies the expiration header in the http response.




It serves different purpose; other client won't get cached result, and
refresh also won't get cached result.

Martin, you still need to exted generator to make it cacheable, with
delta timestamp (simplest approach) or any other way.

Vadim



  

This should allow temporary caching of the result.
I am not sure where this is documented though.


- Original Message -
From: Martin Lüthi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 05, 2002 8:47 AM
Subject: Re: Efficient aggregation


Thank you for your hint. I just tried out XPathDirectoryGenerator
(scratchpad)
which essentially does what I need, but is a lot less messy than my initial
approach. However, also these results seem not to get cached... Presumably


I
  

should save the result with something like a SourceWritingTransformer, and
only rebuild the file after explizit request.


Martin

Nick Airey [EMAIL PROTECTED] writes:





After 1 minute of looking, it seems that the DirectoryGenerator is not
cacheable.

So it is going to re-read the directory every time you hit the pipeline.
Your Xincluded pieces might be cacheable, however. For instance, the
FileGenerator *is* cacheable (if you are using it).


If you can live with refreshing the cached directory every x seconds (or
miliseconds), and you can write some java, you could extend the
DirectoryGenerator to make a caching directory generator, by
implementing interface Cacheable and implementing generateKey() and
generateValidity().  The generateValidity() method would return a
DeltaTimeCacheValidity instance set to the caching time.


Regs,
Nick.


  

--
Martin Lüthi [EMAIL PROTECTED]







-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Expiration Attribute in Pipeline Efficient aggregation

2002-09-05 Thread Ivelin Ivanov


Cocoon 2.1 supports an extra attribute in the pipeline,
which specifies the expiration header in the http response.
This should allow temporary caching of the result.
I am not sure where this is documented though.


- Original Message -
From: Martin Lüthi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 05, 2002 8:47 AM
Subject: Re: Efficient aggregation


Thank you for your hint. I just tried out XPathDirectoryGenerator
(scratchpad)
which essentially does what I need, but is a lot less messy than my initial
approach. However, also these results seem not to get cached... Presumably I
should save the result with something like a SourceWritingTransformer, and
only rebuild the file after explizit request.


Martin

Nick Airey [EMAIL PROTECTED] writes:

 After 1 minute of looking, it seems that the DirectoryGenerator is not
 cacheable.

 So it is going to re-read the directory every time you hit the pipeline.
 Your Xincluded pieces might be cacheable, however. For instance, the
 FileGenerator *is* cacheable (if you are using it).


 If you can live with refreshing the cached directory every x seconds (or
 miliseconds), and you can write some java, you could extend the
 DirectoryGenerator to make a caching directory generator, by
 implementing interface Cacheable and implementing generateKey() and
 generateValidity().  The generateValidity() method would return a
 DeltaTimeCacheValidity instance set to the caching time.


 Regs,
 Nick.

--
Martin Lüthi [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]