You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Upayavira <uv...@upaya.co.uk> on 2003/08/21 13:01:25 UTC

[RT] Prebuilding your cache with the CLI

Vadim has just fixed a bug with the persistent cache not shutting down 
properly. This means that the CLI has access to the Cocoon cache.

For a largely static site, should now be possible to have the CLI crawl 
a site, purely with the intention of building up the cache, which will 
then be used by the servlet.

Does this sound like a good idea (or am I making some wrong assumptions, 
e.g. can the CLI and the servlet share the same persistent cache?)

If this is useful (and would work), I can add an option to the CLI so 
that it doesn't write anything to disk, just builds up the cache.

Thoughts?

Upayavira


Re: [RT] Prebuilding your cache with the CLI

Posted by Vadim Gritsenko <va...@verizon.net>.
Upayavira wrote:

> Vadim Gritsenko wrote:
>
>> Upayavira wrote:
>
...

>>> (or am I making some wrong assumptions, e.g. can the CLI and the 
>>> servlet share the same persistent cache?)
>>
>>
>> If they (CLI/Servlet) produce cache entries with the same key -- then 
>> this will work. 
>
>
> So two completely different processes can access the same store file 
> without conflict?


No, of course there will be conflict. One at a time, please. First -- 
run CLI, when finished -- start servlet. Only other option is to have 
CLI and servlet access *same* bean instance, which is possible (only?) 
when CLI accessing it over the wire.

Vadim



Re: [RT] Prebuilding your cache with the CLI

Posted by Upayavira <uv...@upaya.co.uk>.
Vadim Gritsenko wrote:

> Upayavira wrote:
>
>> Vadim has just fixed a bug with the persistent cache not shutting 
>> down properly. This means that the CLI has access to the Cocoon cache.
>>
>> For a largely static site, should now be possible to have the CLI 
>> crawl a site, purely with the intention of building up the cache, 
>> which will then be used by the servlet.
>>
>> Does this sound like a good idea
>
> Yes. Wget has similar option too. This might be useful for checking 
> for broken links as well. 

Yup. And Wget is the CLI's main competition :-)

>> (or am I making some wrong assumptions, e.g. can the CLI and the 
>> servlet share the same persistent cache?)
>
> If they (CLI/Servlet) produce cache entries with the same key -- then 
> this will work. 

So two completely different processes can access the same store file 
without conflict?

>> If this is useful (and would work), I can add an option to the CLI so 
>> that it doesn't write anything to disk, just builds up the cache. 
>
> Go ahead.

It's on my list!

Regards, Upayavira



Re: [RT] Prebuilding your cache with the CLI

Posted by Vadim Gritsenko <va...@verizon.net>.
Upayavira wrote:

> Vadim has just fixed a bug with the persistent cache not shutting down 
> properly. This means that the CLI has access to the Cocoon cache.
>
> For a largely static site, should now be possible to have the CLI 
> crawl a site, purely with the intention of building up the cache, 
> which will then be used by the servlet.
>
> Does this sound like a good idea


Yes. Wget has similar option too. This might be useful for checking for 
broken links as well.


> (or am I making some wrong assumptions, e.g. can the CLI and the 
> servlet share the same persistent cache?)


If they (CLI/Servlet) produce cache entries with the same key -- then 
this will work.


> If this is useful (and would work), I can add an option to the CLI so 
> that it doesn't write anything to disk, just builds up the cache. 


Go ahead.

Vadim



Re: [RT] Prebuilding your cache with the CLI

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On Thursday, August 21, 2003, at 12:01 PM, Upayavira wrote:

> Vadim has just fixed a bug with the persistent cache not shutting down 
> properly. This means that the CLI has access to the Cocoon cache.
>
> For a largely static site, should now be possible to have the CLI 
> crawl a site, purely with the intention of building up the cache, 
> which will then be used by the servlet.
>
> Does this sound like a good idea (or am I making some wrong 
> assumptions, e.g. can the CLI and the servlet share the same 
> persistent cache?)
>
> If this is useful (and would work), I can add an option to the CLI so 
> that it doesn't write anything to disk, just builds up the cache.
>
> Thoughts?

Sounds like a grand idea :)
I hope it works ... ;)

regards Jeremy