roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: DONT cache specific weblog comments page
Date Tue, 11 Aug 2009 02:34:50 GMT
Hi Mullan,

You might be able to do what you want by writing/modifying some code
because Roller has to do something similar to what you want to do. In
Roller, we support pluggable comment authenticators. For example there
is a math authenticator that presents a math question and we cannot
cache the question because then it would never change. So, we generate
part of the comment page on the server side and fetch it via Ajax to
the client side.

Take a look at these files:
   clientSideInclude.js
   weblog.vm

And take a look at the implementations of CommentAuthenticator.java

You might be able to do what you want to do by writing your own
CommentAuthenticator.

Thanks,
- Dave


On Tue, Aug 4, 2009 at 9:44 AM, Mullan Colm<Colm.Mullan@uk.fujitsu.com> wrote:
> Hi Dave,
>
> Thanks for the reply.
>
> I have an issue where I am extracting user details from a cookie to
> appear on the comments name/email fields on the comments page. With
> caching turned on different user details are populated incorrectly due
> to caching. As the cookie information is not retrieved as the comments
> page is cached initially.
> When caching is turned off, the issue is resolved.
> But I would rather not turn caching off for all weblogs as this will be
> a performance hit.
>
> I would like to know if we could prevent caching on a particular page
> (i.e. comments page ONLY).
>
> If I can't update the code to omit a particular page from the cache
> system, then I may have to re-think a new solution.
>
> I was thinking if something like the following would be possible to-do:
>        on the PageServlet check what page we are on and thus don't
> create a WeblogPageCache instance if on the comments page.
>
> If you have any ideas - all is welcome.
>
> Thanks Colm
>
> -----Original Message-----
> From: Dave [mailto:snoopdave@gmail.com]
> Sent: 04 August 2009 04:17
> To: user@roller.apache.org
> Subject: Re: DONT cache specific weblog comments page
>
> Roller doesn't support caching of comments pages only.
>
> Why would anybody want to do that? Maybe there is another way to do
> what you want to do.
>
> - Dave
>
>
>
> On Wed, Jul 29, 2009 at 7:04 AM, Mullan Colm<Colm.Mullan@uk.fujitsu.com>
> wrote:
>> Hi Folks
>>
>>
>>
>> Is there a mechanism to only cache some weblog pages?
>>
>>
>>
>> I would like to turn off caching for the comments page only, without
>> turning off caching for all weblog content.
>>
>>
>>
>> For example I don't want to set the following to false: for all
> content.
>>
>>
>>
>> # Weblog page cache (all the weblog content)
>>
>> cache.weblogpage.enabled=false
>>
>>
>>
>> If this cannot be done by configure in the properties file settings,
>> could you point out in the code where the weblog cache is added and
>> based on the page name I could manually add logic to don't cache the
>> comments page.
>>
>>
>>
>> I am using roller 3.1.
>>
>>
>>
>> Many Thanks Colm
>>
>>
>

Mime
View raw message