caching

View: New views
10 Messages — Rating Filter:   Alert me  

caching

by Horatia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello!

To understand caching a little better I would like to ask someone to give me some explanations:

I'm running tomcat 6 standalone as a webserver with roller 4.01.
Both of them are able to cache content. My questions are:

Are tomcat & roller caching the same content?
Is this a connection in series; i.e. tomcat caches the content from roller cache?
Is it better to have only one cache in operation, and if yes, tomcat or roller?

Horatia

Re: caching

by Dave-401 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 13, 2009 at 8:11 AM, Horatia <roller-ml@...> wrote:
> To understand caching a little better I would like to ask someone to give me some explanations:
>
> I'm running tomcat 6 standalone as a webserver with roller 4.01.
> Both of them are able to cache content. My questions are:
>
> Are tomcat & roller caching the same content?
> Is this a connection in series; i.e. tomcat caches the content from roller cache?
> Is it better to have only one cache in operation, and if yes, tomcat or roller?

What caching feature of Tomcat are you referring to? Can you please
provide a link to the page that explains how to enable and configure
this Tomcat caching?

- Dave

Re: caching

by Horatia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have this values inside server.xml, host-element:

  cachingAllowed="true"
  cacheMaxSize="40960"
  cacheObjectMaxSize="1024"
  cacheTTL="600000"

>> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

Roller runs with the default values.

As I can see tomcat serves the roller pages very fast.

Horatia
 

Re: caching

by Dave-401 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 13, 2009 at 11:10 AM, Horatia <roller-ml@...> wrote:

> I have this values inside server.xml, host-element:
>
>  cachingAllowed="true"
>  cacheMaxSize="40960"
>  cacheObjectMaxSize="1024"
>  cacheTTL="600000"
>
>>> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
>
> Roller runs with the default values.
>
> As I can see tomcat serves the roller pages very fast.

Thanks for the link. I had forgotten about those settings. That Tomcat
cache takes care of caching the static files that Apache servers. In
other words, Tomcat caches anything that is not produced by a JSP or
Servlet.

So, Tomcat doesn't cache pages produced by Roller and that's why
Roller includes its own cache.

- Dave

Re: caching

by Anil Gangolli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Different caches.

The server.xml flags regulate Tomcat's cache of static resources
typically delivered by the DefaultServlet.
See docs related to that.

Roller caches constructed web pages.

Horatia wrote:

> I have this values inside server.xml, host-element:
>
>   cachingAllowed="true"
>   cacheMaxSize="40960"
>   cacheObjectMaxSize="1024"
>   cacheTTL="600000"
>
>  
>>> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
>>>      
>
> Roller runs with the default values.
>
> As I can see tomcat serves the roller pages very fast.
>
> Horatia
>  
>  


Re: caching

by Horatia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


My definition of content:

dynamic = made on the fly
static = ready for reading (html)

Imho all cached content is static and tomcat stores this pages
in his temp-folder and/or work directory; from this files tomcat
serves the pages and this are constructed web pages. What does roller cache in difference to tomcat?

Horatia


> Different caches.
>
> The server.xml flags regulate Tomcat's cache of static resources
> typically delivered by the DefaultServlet.
> See docs related to that.
>
> Roller caches constructed web pages.
>
> Horatia wrote:
> > I have this values inside server.xml, host-element:
> >
> >   cachingAllowed="true"
> >   cacheMaxSize="40960"
> >   cacheObjectMaxSize="1024"
> >   cacheTTL="600000"
> >
> >  
> >>> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
> >>>      
> >
> > Roller runs with the default values.
> >
> > As I can see tomcat serves the roller pages very fast.
> >
> > Horatia
> >  
> >  

Re: caching

by eddgrant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I believe Roller uses the Velocity templating engine to generate page content, Velocity templates are populated with data (stuff like entry content) from the Database. It is possible to cache Velocity templates and this can lead to great performance inprovements since Velocity no longer has to instantiate the required templates for each request it serves. This may be what Dave was talking about in terms of Roller caching?

Cheers,

Edd

On Thu, 15 Oct 2009 10:02:14 +0200, "Horatia" <roller-ml@...> wrote:

>
> My definition of content:
>
> dynamic = made on the fly
> static = ready for reading (html)
>
> Imho all cached content is static and tomcat stores this pages
> in his temp-folder and/or work directory; from this files tomcat
> serves the pages and this are constructed web pages. What does roller
> cache in difference to tomcat?
>
> Horatia
>
>
>> Different caches.
>>
>> The server.xml flags regulate Tomcat's cache of static resources
>> typically delivered by the DefaultServlet.
>> See docs related to that.
>>
>> Roller caches constructed web pages.
>>
>> Horatia wrote:
>> > I have this values inside server.xml, host-element:
>> >
>> >   cachingAllowed="true"
>> >   cacheMaxSize="40960"
>> >   cacheObjectMaxSize="1024"
>> >   cacheTTL="600000"
>> >
>> >
>> >>> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
>> >>>
>> >
>> > Roller runs with the default values.
>> >
>> > As I can see tomcat serves the roller pages very fast.
>> >
>> > Horatia
>> >
>> >


Re: caching

by Dave-401 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 15, 2009 at 4:17 AM,  <edd@...> wrote:
> I believe Roller uses the Velocity templating engine to generate page content, Velocity templates are populated with data (stuff like entry content) from the Database. It is possible to cache Velocity templates and this can lead to great performance inprovements since Velocity no longer has to instantiate the required templates for each request it serves. This may be what Dave was talking about in terms of Roller caching?

That's right. Roller caches the weblog pages and feeds that it
produces. Take a look at the cache configuration section in
roller.properties (4.0 install guide, section 11) and you can see that
there are four caches that you can configure:

   sitewide: for site-wide blog and feeds
   weblogpage: for ordinary weblog pages
   weblogfeed: for ordinary feed pages
   planet: for planet feeds


- Dave

Re: caching

by Horatia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


...i.e. roller caches "browser readable static content".
Is there a transformation from roller cache to tomcat workdir?

Horatia

Re: caching

by Anil Gangolli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Tomcat caches static content, which means that the content is already in
its deliverable form in a file.

Roller caches the results of dynamically building the web pages that you
see.  Tomcat does not cache this for us.

Both Tomcat's cache and Roller's cache are in-memory caches.  

What you see in Tomcat's work dir is not the content of either cache.  
What you will see there is the result of the JSP compilations for the
JSP pages.  The servlet container compiles JSPs to servlet classes.  
Tomcat keeps the class files that result from this compilation in the
work dir.

--a.

Horatia wrote:
> ...i.e. roller caches "browser readable static content".
> Is there a transformation from roller cache to tomcat workdir?
>
> Horatia
>