You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Markus Strickler <ma...@braindump.ms> on 2009/02/24 12:57:10 UTC

Invalidating Markup Cache for external page templates

Hi-

I'm currently implementing a way to load page templates provided from  
a CMS that exports the statically to the file system.
The loading part itself already works fine, now I'm looking for a good  
way to refresh the markup cache, if the template files have changed.
Before I roll my own solution I was wondering if I can somehow use the  
wicket internal mechanisms used for development mode.

Thanks for any insights,

-markus


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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


Re: Invalidating Markup Cache for external page templates

Posted by Markus Strickler <ma...@braindump.ms>.
OK,

after some source code research it seems to boil down to the question:
Can I safely use ModificationWatcher in a live environment?

And is there a way to make it watch only certain resources, so that it  
doesn't have to check all the resources that cannot change anyway?

Thanks,

-markus

Zitat von "Markus Strickler" <ma...@braindump.ms>:

>
> Hi-
>
> I'm currently implementing a way to load page templates provided  
> from a CMS that exports the statically to the file system.
> The loading part itself already works fine, now I'm looking for a  
> good way to refresh the markup cache, if the template files have  
> changed.
> Before I roll my own solution I was wondering if I can somehow use  
> the wicket internal mechanisms used for development mode.
>
> Thanks for any insights,
>
> -markus
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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


Re: Invalidating Markup Cache for external page templates

Posted by Markus Strickler <ma...@braindump.ms>.
Hm, wouldn't this leave the "old" versions of the markup in the cache?
And also require a check of the last modified date every time a page  
gets created?
I was rather thinking of a timer based solution that checks the last  
modified date periodically and removes it from the cache if the file  
on disk is newer.

-markus

Am 24.02.2009 um 18:55 schrieb Igor Vaynberg:

> well you can create a markup cache key that is based on the
> lastmodified date of the file that contains the markup.
>
> -igor
>
> On Tue, Feb 24, 2009 at 9:53 AM, Markus Strickler  
> <ma...@braindump.ms> wrote:
>> Hi-
>>
>> thanks for your reply.
>> I'm not quite sure how IMarkupCacheKeyProvider fits in here. I'm  
>> actually
>> looking for a way to invalidate the cache, in case the markup has  
>> changed.
>>
>> Thanks,
>>
>> -markus
>>
>> Zitat von "Igor Vaynberg" <ig...@gmail.com>:
>>
>>> see IMarkupCacheKeyProvider, you can let pages that load markup from
>>> the filesystem implement this.
>>>
>>> -igor
>>>
>>> On Tue, Feb 24, 2009 at 3:57 AM, Markus Strickler <markus@braindump.ms 
>>> >
>>> wrote:
>>>>
>>>> Hi-
>>>>
>>>> I'm currently implementing a way to load page templates provided  
>>>> from a
>>>> CMS
>>>> that exports the statically to the file system.
>>>> The loading part itself already works fine, now I'm looking for a  
>>>> good
>>>> way
>>>> to refresh the markup cache, if the template files have changed.
>>>> Before I roll my own solution I was wondering if I can somehow  
>>>> use the
>>>> wicket internal mechanisms used for development mode.
>>>>
>>>> Thanks for any insights,
>>>>
>>>> -markus
>>>>
>>>>
>>>> ----------------------------------------------------------------
>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>
>>>>
>>>> --
>>>> This message has been scanned for viruses and
>>>> dangerous content by MailScanner, and is
>>>> believed to be clean.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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


Re: Invalidating Markup Cache for external page templates

Posted by Igor Vaynberg <ig...@gmail.com>.
well you can create a markup cache key that is based on the
lastmodified date of the file that contains the markup.

-igor

On Tue, Feb 24, 2009 at 9:53 AM, Markus Strickler <ma...@braindump.ms> wrote:
> Hi-
>
> thanks for your reply.
> I'm not quite sure how IMarkupCacheKeyProvider fits in here. I'm actually
> looking for a way to invalidate the cache, in case the markup has changed.
>
> Thanks,
>
> -markus
>
> Zitat von "Igor Vaynberg" <ig...@gmail.com>:
>
>> see IMarkupCacheKeyProvider, you can let pages that load markup from
>> the filesystem implement this.
>>
>> -igor
>>
>> On Tue, Feb 24, 2009 at 3:57 AM, Markus Strickler <ma...@braindump.ms>
>> wrote:
>>>
>>> Hi-
>>>
>>> I'm currently implementing a way to load page templates provided from a
>>> CMS
>>> that exports the statically to the file system.
>>> The loading part itself already works fine, now I'm looking for a good
>>> way
>>> to refresh the markup cache, if the template files have changed.
>>> Before I roll my own solution I was wondering if I can somehow use the
>>> wicket internal mechanisms used for development mode.
>>>
>>> Thanks for any insights,
>>>
>>> -markus
>>>
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Invalidating Markup Cache for external page templates

Posted by Markus Strickler <ma...@braindump.ms>.
Hi-

thanks for your reply.
I'm not quite sure how IMarkupCacheKeyProvider fits in here. I'm  
actually looking for a way to invalidate the cache, in case the markup  
has changed.

Thanks,

-markus

Zitat von "Igor Vaynberg" <ig...@gmail.com>:

> see IMarkupCacheKeyProvider, you can let pages that load markup from
> the filesystem implement this.
>
> -igor
>
> On Tue, Feb 24, 2009 at 3:57 AM, Markus Strickler  
> <ma...@braindump.ms> wrote:
>>
>> Hi-
>>
>> I'm currently implementing a way to load page templates provided from a CMS
>> that exports the statically to the file system.
>> The loading part itself already works fine, now I'm looking for a good way
>> to refresh the markup cache, if the template files have changed.
>> Before I roll my own solution I was wondering if I can somehow use the
>> wicket internal mechanisms used for development mode.
>>
>> Thanks for any insights,
>>
>> -markus
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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


Re: Invalidating Markup Cache for external page templates

Posted by Igor Vaynberg <ig...@gmail.com>.
see IMarkupCacheKeyProvider, you can let pages that load markup from
the filesystem implement this.

-igor

On Tue, Feb 24, 2009 at 3:57 AM, Markus Strickler <ma...@braindump.ms> wrote:
>
> Hi-
>
> I'm currently implementing a way to load page templates provided from a CMS
> that exports the statically to the file system.
> The loading part itself already works fine, now I'm looking for a good way
> to refresh the markup cache, if the template files have changed.
> Before I roll my own solution I was wondering if I can somehow use the
> wicket internal mechanisms used for development mode.
>
> Thanks for any insights,
>
> -markus
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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