You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by rufio <ru...@op.pl> on 2003/12/20 21:19:05 UTC

problem with caching aggregated src

hi

My page doesn't refresh when I add new file.
This is part of my sitemap file (whole sitemap.xml apart from pipelines is
out-of-the-box AFAIR)

First i prepare table of contents from src files...

<map:match pattern="srcdir-name.xml">
 <map:generate type="xpathdirectory" src="src/main">
  <map:parameter name="xmlFiles" value="\.xml$"/>
  <map:parameter name="xpath" value="/page/@name"/>
 </map:generate>
 <map:transform src="style/dir2toc.xsl"/>
 <map:serialize type="xml"/>
</map:match>

...then concatenate it with static toc file, keeping structure...

<map:match pattern="toc.xml">
 <map:aggregate element="menus">
  <map:part src="cocoon:/srcdir-name.xml" strip-root="true"/>
  <map:part src="src/toc.xml" strip-root="true"/>
 </map:aggregate>
 <map:serialize type="xml"/>
</map:match>

...and join it with actual content to build a page.

<map:match pattern="*.html">
 <map:aggregate element="site">
  <map:part src="cocoon:/toc.xml"/>
  <map:part src="src/main/{1}.xml"/>
 </map:aggregate>
 <map:transform src="style/toc2html2.xsl"/>
 <map:serialize type="xhtml"/>
</map:match>

Now, when I add a file to src/main, toc.xml reflects the change, but result page
doesn't, unless it's the page built from the new file.

It's ok after I restart tomcat, so it looks like caching problem.

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Joerg Heinicke <jo...@gmx.de>.
On 03.01.2004 22:08, Jorg Heymans wrote:

> Doesn't the lastmodified check on the directory cover all this?
> 
> 1) Validity stores the src directory last modified attribute + number of 
> files that were added to the generator
> 2) Validity is invalidated if any of the above changes. There is no 
> iterating over (potentially long) filesets to compare attributes.
> 
> Both solutions are ok, but this one is simpler and more efficient.
> 
> wdyt?

The answer to your first question: no. The problem is that the 
lastmodified check on the directory covers only deletes and adds in this 
directory, but no simple file modifications (NTFS, Win2k). Furthermore 
it's not done recursively, so you still have to iterate over all and 
everything for the lastmodified check, you can only shorten it *if 
something has changed*.

And when thinking about it I wonder why it does not work: If an add 
changes the lastmodified timestamp of the directory the validity should 
be invalidated as the directory timestamp is also tested. Maybe it's to 
late and I simply oversee something ... Or some file systems *do* behave 
in another way.

Joerg

> Joerg Heinicke wrote:
> 
>>> Cool tnx, so that's 2 platforms out of 3, i'll get started on that 
>>> patch tonight.
>>
>>
>> There was a really simple patch proposal - if I could find it ...
>>
>> You only have to take the number of entries in the validity into 
>> account additionally. If this number is different than before, 
>> something has been added or deleted. If it has not changed, you have 
>> to look on the timestamps. If a file has been deleted this timestamp 
>> check finds it out as it searches for the file. This also means that 
>> adding one file and at the same time deleting the file would also make 
>> the cached content invalid.
>>
>> Ah found it in my old mails ... it's not that old:
>>
>> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107066685228531&w=2
>>
>> Joerg
> 
> 
> 
> ---------------------------------------------------------------------
> 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: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
Doesn't the lastmodified check on the directory cover all this?

1) Validity stores the src directory last modified attribute + number of 
files that were added to the generator
2) Validity is invalidated if any of the above changes. There is no 
iterating over (potentially long) filesets to compare attributes.

Both solutions are ok, but this one is simpler and more efficient.

wdyt?

Jorg

Joerg Heinicke wrote:

> On 03.01.2004 19:26, Jorg Heymans wrote:
> 
>> Cool tnx, so that's 2 platforms out of 3, i'll get started on that 
>> patch tonight.
> 
> 
> There was a really simple patch proposal - if I could find it ...
> 
> You only have to take the number of entries in the validity into account 
> additionally. If this number is different than before, something has 
> been added or deleted. If it has not changed, you have to look on the 
> timestamps. If a file has been deleted this timestamp check finds it out 
> as it searches for the file. This also means that adding one file and at 
> the same time deleting the file would also make the cached content invalid.
> 
> Ah found it in my old mails ... it's not that old:
> 
> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107066685228531&w=2
> 
> Joerg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Joerg Heinicke <jo...@gmx.de>.
On 03.01.2004 19:26, Jorg Heymans wrote:

> Cool tnx, so that's 2 platforms out of 3, i'll get started on that patch 
> tonight.

There was a really simple patch proposal - if I could find it ...

You only have to take the number of entries in the validity into account 
additionally. If this number is different than before, something has 
been added or deleted. If it has not changed, you have to look on the 
timestamps. If a file has been deleted this timestamp check finds it out 
as it searches for the file. This also means that adding one file and at 
the same time deleting the file would also make the cached content invalid.

Ah found it in my old mails ... it's not that old:

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107066685228531&w=2

Joerg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Problems with date and xsp

Posted by Jorg Heymans <jh...@domek.be>.
Could you *please* stop posting your problem in other threads? All it 
takes is to write a new mail instead of hitting reply+erase subject.

Davide wrote:

> Hi, i have some problems in getting the actual timestamp to put it into 
> a db.
> 
> My xsp is:
> 
> <?xml version="1.0"?>
> 
> <xsp:page language="java"
>     xmlns:xsp="http://apache.org/xsp"
>     xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>     xmlns:xsp-session-fw="http://apache.org/xsp/session-fw/1.0"
>     xmlns:esql="http://apache.org/cocoon/SQL/v2">
>     <xsp:logic>
>         java.util.Date now=new java.util.Date();
>     </xsp:logic>
> 
>     <addcomment>
>         <page-title>Add a comment</page-title>
>         <!-- header bar background source file -->
>         <bg>images/logobg.gif</bg>
>         <!-- mcnavigator css -->
>         <css>css/main.css</css>
>         <esql:connection>
>             <esql:pool>mcnavigator</esql:pool>
>             <esql:execute-query>
>                 <esql:query>Insert into comments (User_ID, Comment_text, 
> Commented_URL, Comment_Date, Comment_browser) values (
>                     '<xsp-session-fw:getxml context="authentication" 
> path="/authentication/ID"/>',
>                     '<xsp-request:get-parameter name="comment_text"/>',
>                     '<xsp-request:get-parameter name="link"/>',
>                     '<xsp:expr>new 
> java.sql.Timestamp(now.getTime())</xsp:expr>',
>                     '<xsp-request:get-header name="user-agent"/>')
>                 </esql:query>
>                 <esql:error-results>An error occurred</esql:error-results>
>                 <esql:update-results>
>                     <message>Your comment has ben added; you can now 
> close this window</message>
>                 </esql:update-results>
>             </esql:execute-query>
>         </esql:connection>
>     </addcomment>
> </xsp:page>
> 
> The problem is that every time i add a new record to the db using this 
> xsp i notice that the time doesn't change. Any solution??
> 
> Best Regards, Davide


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Problems with date and xsp

Posted by Davide <da...@aliceposta.it>.
Hi, i have some problems in getting the actual timestamp to put it into a db.

My xsp is:

<?xml version="1.0"?>

<xsp:page language="java"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:xsp-request="http://apache.org/xsp/request/2.0"
	xmlns:xsp-session-fw="http://apache.org/xsp/session-fw/1.0"
	xmlns:esql="http://apache.org/cocoon/SQL/v2">
	<xsp:logic>
		java.util.Date now=new java.util.Date();
	</xsp:logic>

	<addcomment>
		<page-title>Add a comment</page-title>
		<!-- header bar background source file -->
		<bg>images/logobg.gif</bg>
		<!-- mcnavigator css -->
		<css>css/main.css</css>
		<esql:connection>
			<esql:pool>mcnavigator</esql:pool>
			<esql:execute-query>
				<esql:query>Insert into comments (User_ID, Comment_text, Commented_URL, 
Comment_Date, Comment_browser) values (
					'<xsp-session-fw:getxml context="authentication" 
path="/authentication/ID"/>',
					'<xsp-request:get-parameter name="comment_text"/>',
					'<xsp-request:get-parameter name="link"/>',
					'<xsp:expr>new java.sql.Timestamp(now.getTime())</xsp:expr>',
					'<xsp-request:get-header name="user-agent"/>')
				</esql:query>
				<esql:error-results>An error occurred</esql:error-results>
				<esql:update-results>
					<message>Your comment has ben added; you can now close this 
window</message>
				</esql:update-results>
			</esql:execute-query>
		</esql:connection>
	</addcomment>
</xsp:page>

The problem is that every time i add a new record to the db using this xsp 
i notice that the time doesn't change. Any solution??

Best Regards, Davide



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
Cool tnx, so that's 2 platforms out of 3, i'll get started on that patch 
tonight.


rufio wrote:

> on Sat, 03 Jan 2004 18:46:32 +0100 Jorg Heymans <jh...@domek.be> wrote:
> 
> 
>>I had a look at this. Joerg's observation is correct.
>>
>>There is an easy way around IMHO :
>>Check the "lastmodified" attribute of the directory instead of each 
>>individual file.
>>
>>Adding or removing files in a directory updates the lastmodified 
>>timestamp of this directory (at least on windows). If someone can check 
>>this behaviour on linux/macosX (don't have axx to a linux box until 
>>wednesday) then i'ld be happy to provide a patch.
> 
> 
> creating a file changes mtime of dir on linux.
> 
> Regards, Rufio


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sat, 03 Jan 2004 18:46:32 +0100 Jorg Heymans <jh...@domek.be> wrote:

> I had a look at this. Joerg's observation is correct.
> 
> There is an easy way around IMHO :
> Check the "lastmodified" attribute of the directory instead of each 
> individual file.
> 
> Adding or removing files in a directory updates the lastmodified 
> timestamp of this directory (at least on windows). If someone can check 
> this behaviour on linux/macosX (don't have axx to a linux box until 
> wednesday) then i'ld be happy to provide a patch.

creating a file changes mtime of dir on linux.

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
I had a look at this. Joerg's observation is correct.

There is an easy way around IMHO :
Check the "lastmodified" attribute of the directory instead of each 
individual file.

Adding or removing files in a directory updates the lastmodified 
timestamp of this directory (at least on windows). If someone can check 
this behaviour on linux/macosX (don't have axx to a linux box until 
wednesday) then i'ld be happy to provide a patch.

rgds
Jorg

Joerg Heinicke wrote:
> On 21.12.2003 16:00, rufio wrote:
> 
>>> ok so :
>>>
>>> 1) test1.html -> caches
>>> 2) you add a file to src/main and request test1.html -> new file does 
>>> not show up
>>> 3) you request test2.html -> new file shows up and is cached
>>>
>>> Is this what you're getting now?
>>
>>
>>
>> Exactly it's like this:
>> I have some xml files in src/main, eg file1.xml and file2.xml, and all 
>> of them
>> show up when I call any page as a menu. Now:
>> 1) request file1.html -> file1.xml + all as a menu
>> 2) add new.xml to src/main
>> 3) refresh file1.html -> nothing happens
>> 3) request file2.html -> see new menu with new.html
> 
> 
> It's a problem with the directory generator or it's validity as it does 
> only test on the files already stored in the collection, but does not 
> know about new files. So the cache is not invalidated after adding a new 
> file. I read this somewhere some days ago, but I don't know exactly 
> where. I couldn't find a bug in bugzilla, so can you file it there please?
> Does anybody else know where it was already mentioned?
> 
> Joerg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@o2.pl>.
on Sat, 03 Jan 2004 13:07:03 +0100 Joerg Heinicke <jo...@gmx.de> wrote:

> I couldn't find a bug in bugzilla, so can you file it there please?

I was going to locate the problem, send description and recipe to the bugtrack
in few days but in this situation I'll do it just after I get my pass to
bugtrack.

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sat, 03 Jan 2004 13:07:03 +0100 Joerg Heinicke <jo...@gmx.de> wrote:

> I couldn't find a bug in bugzilla, so can you file it there please?

I was going to locate the problem, send description and recipe to the bugtrack
in few days but in this situation I'll do it just after I get my pass to
bugtrack.

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Joerg Heinicke <jo...@gmx.de>.
On 21.12.2003 16:00, rufio wrote:

>>ok so :
>>
>>1) test1.html -> caches
>>2) you add a file to src/main and request test1.html -> new file does 
>>not show up
>>3) you request test2.html -> new file shows up and is cached
>>
>>Is this what you're getting now?
> 
> 
> Exactly it's like this:
> I have some xml files in src/main, eg file1.xml and file2.xml, and all of them
> show up when I call any page as a menu. Now:
> 1) request file1.html -> file1.xml + all as a menu
> 2) add new.xml to src/main
> 3) refresh file1.html -> nothing happens
> 3) request file2.html -> see new menu with new.html

It's a problem with the directory generator or it's validity as it does 
only test on the files already stored in the collection, but does not 
know about new files. So the cache is not invalidated after adding a new 
file. I read this somewhere some days ago, but I don't know exactly 
where. I couldn't find a bug in bugzilla, so can you file it there please?
Does anybody else know where it was already mentioned?

Joerg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sun, 21 Dec 2003 13:56:51 -0500 Geoff Howard <co...@leverageweb.com> wrote:

> Have you eliminated the possiblity of local browser cache?

Yes, I usually refresh twice when I develop webapps.


Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Geoff Howard <co...@leverageweb.com>.
rufio wrote:

> on Sun, 21 Dec 2003 16:57:14 +0100 Jorg Heymans <jh...@domek.be> wrote:
> 
> 
>>Question is do you really need caching? I mean how many hits/sec do you 
>>really expect from this in a live environment?
> 
> 
> No, I don't need caching now, I do my homepage on cocoon just to learn using it.
> But I guess I'll need one in furure comercial projects.
> 
> I'll try to write minimal sitemap that reproduces the bug and send it on
> bugzilla.

Have you eliminated the possiblity of local browser cache?

Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sun, 21 Dec 2003 16:57:14 +0100 Jorg Heymans <jh...@domek.be> wrote:

> Question is do you really need caching? I mean how many hits/sec do you 
> really expect from this in a live environment?

No, I don't need caching now, I do my homepage on cocoon just to learn using it.
But I guess I'll need one in furure comercial projects.

I'll try to write minimal sitemap that reproduces the bug and send it on
bugzilla.

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
Please file it as a bug in bugzilla, it might just be something wierd 
going on.

Question is do you really need caching? I mean how many hits/sec do you 
really expect from this in a live environment?

Another workaround would could be to touch the stylesheet after a 
fileupdate in src/main, this should invalidate the caching key and 
trigger a full pipeline reload.

jorg

rufio wrote:

> on Sun, 21 Dec 2003 15:20:37 +0100 Jorg Heymans <jh...@domek.be> wrote:
> 
> 
>>ok so :
>>
>>1) test1.html -> caches
>>2) you add a file to src/main and request test1.html -> new file does 
>>not show up
>>3) you request test2.html -> new file shows up and is cached
>>
>>Is this what you're getting now?
> 
> 
> Exactly it's like this:
> I have some xml files in src/main, eg file1.xml and file2.xml, and all of them
> show up when I call any page as a menu. Now:
> 1) request file1.html -> file1.xml + all as a menu
> 2) add new.xml to src/main
> 3) refresh file1.html -> nothing happens
> 3) request file2.html -> see new menu with new.html
> 
> 
> 
>>Note that you can also set map:pipeline type="noncaching", try setting 
>>this. It's suboptimal but unless you're on a high traffic site you could 
>>live with it.
> 
> 
> Now it's ok.
> It's a development environment :) but what if it was production?
> 
> Regards, Rufio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sun, 21 Dec 2003 15:20:37 +0100 Jorg Heymans <jh...@domek.be> wrote:

> ok so :
> 
> 1) test1.html -> caches
> 2) you add a file to src/main and request test1.html -> new file does 
> not show up
> 3) you request test2.html -> new file shows up and is cached
> 
> Is this what you're getting now?

Exactly it's like this:
I have some xml files in src/main, eg file1.xml and file2.xml, and all of them
show up when I call any page as a menu. Now:
1) request file1.html -> file1.xml + all as a menu
2) add new.xml to src/main
3) refresh file1.html -> nothing happens
3) request file2.html -> see new menu with new.html


> Note that you can also set map:pipeline type="noncaching", try setting 
> this. It's suboptimal but unless you're on a high traffic site you could 
> live with it.

Now it's ok.
It's a development environment :) but what if it was production?

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
ok so :

1) test1.html -> caches
2) you add a file to src/main and request test1.html -> new file does 
not show up
3) you request test2.html -> new file shows up and is cached

Is this what you're getting now?

Note that you can also set map:pipeline type="noncaching", try setting 
this. It's suboptimal but unless you're on a high traffic site you could 
live with it.

hth
Jorg

rufio wrote:

> on Sun, 21 Dec 2003 12:27:24 +0100 Jorg Heymans <jh...@domek.be> wrote:
> 
> 
>>As a last option: have you tried setting <map:pipeline type="caching"> 
>>on all the pipelines?
> 
> 
> It works now but only if I open another page, i.e. after I change some files and
> refresh - nothing changes, only when I open other page.
> Is this normal behaviour?
> 
> Regards, Rufio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sun, 21 Dec 2003 12:27:24 +0100 Jorg Heymans <jh...@domek.be> wrote:

> As a last option: have you tried setting <map:pipeline type="caching"> 
> on all the pipelines?

It works now but only if I open another page, i.e. after I change some files and
refresh - nothing changes, only when I open other page.
Is this normal behaviour?

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
As a last option: have you tried setting <map:pipeline type="caching"> 
on all the pipelines?

If you don't get any further with this then you should report it in 
bugzilla (nagoya.apache.org), make sure you report the problem as clear 
and concise as possible so the developers can easily reproduce it.

rgds
Jorg

rufio wrote:
> on Sat, 20 Dec 2003 23:55:29 +0100 Jorg Heymans <jh...@domek.be> wrote:
> 
> 
> 
>>>>Can you enable full debugging on core.log
> 
> 
> it's 34K so I zipped it.
> 
> 1st I get dopoduszki.html which is in the TOC, then test2.html for just created
> test2.xml
> 
> Regards, Rufio
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> 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: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sat, 20 Dec 2003 23:55:29 +0100 Jorg Heymans <jh...@domek.be> wrote:


> >>Can you enable full debugging on core.log

it's 34K so I zipped it.

1st I get dopoduszki.html which is in the TOC, then test2.html for just created
test2.xml

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

Re: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
not sure on 2.1.x, there should be something like
       <!-- Cocoon cache and stores logger -->
       <category name="store" log-level="DEBUG">
         <log-target id-ref="core"/>
         <log-target id-ref="error"/>
       </category>

Make sure it's set to debug, if there is no such thing, just set all of 
them to DEBUG and try again.


rufio wrote:

> on Sat, 20 Dec 2003 22:45:17 +0100 Jorg Heymans <jh...@domek.be> wrote:
> 
> 
>><snip>
>>
>>>>><map:match pattern="*.html">
>>>>><map:aggregate element="site">
>>>>> <map:part src="cocoon:/toc.xml"/>
>>>>> <map:part src="src/main/{1}.xml"/>
>>>>></map:aggregate>
>>>>><map:transform src="style/toc2html2.xsl"/>
>>>>><map:serialize type="xhtml"/>
>>>>></map:match>
>>>
>>Can you enable full debugging on core.log
> 
> 
> Sure. How?
> 
> As I look at the logkit.xconf i'd say it's enabled but core.log is empty.
> 
> Regards, Rufio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sat, 20 Dec 2003 22:45:17 +0100 Jorg Heymans <jh...@domek.be> wrote:

> <snip>
> 
> >>><map:match pattern="*.html">
> >>> <map:aggregate element="site">
> >>>  <map:part src="cocoon:/toc.xml"/>
> >>>  <map:part src="src/main/{1}.xml"/>
> >>> </map:aggregate>
> >>> <map:transform src="style/toc2html2.xsl"/>
> >>> <map:serialize type="xhtml"/>
> >>></map:match>
> > 
> 
> Can you enable full debugging on core.log

Sure. How?

As I look at the logkit.xconf i'd say it's enabled but core.log is empty.

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
<snip>

>>><map:match pattern="*.html">
>>> <map:aggregate element="site">
>>>  <map:part src="cocoon:/toc.xml"/>
>>>  <map:part src="src/main/{1}.xml"/>
>>> </map:aggregate>
>>> <map:transform src="style/toc2html2.xsl"/>
>>> <map:serialize type="xhtml"/>
>>></map:match>
> 

Can you enable full debugging on core.log and have a look what it's 
saying after you requested an html page? It has quite verbose logging on 
whether data is retrieved from cache and why/why not, this might give us 
more insight.

jorg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by rufio <ru...@op.pl>.
on Sat, 20 Dec 2003 21:35:52 +0100 Jorg Heymans <jh...@domek.be> wrote:

> Are you using 2.0.4?

no, 2.1.2
 
> If you're using 2.1.x then you shouldn't be affected by this bug and 
> something else is wrong. Is your xpathdirectory generating correct 
> cachevalidity and cachekey?
> 
> Jorg
> >
> > <map:match pattern="srcdir-name.xml">
> >  <map:generate type="xpathdirectory" src="src/main">
> > [...]
> > </map:match>
> > [...]
> > <map:match pattern="toc.xml">
> >  <map:aggregate element="menus">
> >   <map:part src="cocoon:/srcdir-name.xml" strip-root="true"/>
> >   <map:part src="src/toc.xml" strip-root="true"/>
> >  </map:aggregate>
> >  <map:serialize type="xml"/>
> > </map:match>

Everything is ok until this point, GETting toc.xml gives proper results.

> > <map:match pattern="*.html">
> >  <map:aggregate element="site">
> >   <map:part src="cocoon:/toc.xml"/>
> >   <map:part src="src/main/{1}.xml"/>
> >  </map:aggregate>
> >  <map:transform src="style/toc2html2.xsl"/>
> >  <map:serialize type="xhtml"/>
> > </map:match>

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: problem with caching aggregated src

Posted by Jorg Heymans <jh...@domek.be>.
Are you using 2.0.4?

If yes have a look at thread
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107123040710707&w=2

and bug
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25481

If you're using 2.1.x then you shouldn't be affected by this bug and 
something else is wrong. Is your xpathdirectory generating correct 
cachevalidity and cachekey?

Jorg
> 
> My page doesn't refresh when I add new file.
> This is part of my sitemap file (whole sitemap.xml apart from pipelines is
> out-of-the-box AFAIR)
> 
> First i prepare table of contents from src files...
> 
> <map:match pattern="srcdir-name.xml">
>  <map:generate type="xpathdirectory" src="src/main">
>   <map:parameter name="xmlFiles" value="\.xml$"/>
>   <map:parameter name="xpath" value="/page/@name"/>
>  </map:generate>
>  <map:transform src="style/dir2toc.xsl"/>
>  <map:serialize type="xml"/>
> </map:match>
> 
> ...then concatenate it with static toc file, keeping structure...
> 
> <map:match pattern="toc.xml">
>  <map:aggregate element="menus">
>   <map:part src="cocoon:/srcdir-name.xml" strip-root="true"/>
>   <map:part src="src/toc.xml" strip-root="true"/>
>  </map:aggregate>
>  <map:serialize type="xml"/>
> </map:match>
> 
> ...and join it with actual content to build a page.
> 
> <map:match pattern="*.html">
>  <map:aggregate element="site">
>   <map:part src="cocoon:/toc.xml"/>
>   <map:part src="src/main/{1}.xml"/>
>  </map:aggregate>
>  <map:transform src="style/toc2html2.xsl"/>
>  <map:serialize type="xhtml"/>
> </map:match>
> 
> Now, when I add a file to src/main, toc.xml reflects the change, but result page
> doesn't, unless it's the page built from the new file.
> 
> It's ok after I restart tomcat, so it looks like caching problem.
> 
> Regards, Rufio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org