You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Arjun Dhar <dh...@yahoo.com> on 2010/11/04 16:35:57 UTC

Resource caching, Deployment Mode Re-visited

Hi,
 I'm trying to understand wickets ability to cache and how to optimize of
the deployment mode etc.

I wanna keep it in production (DEPLOYMENT MODE). However, when a resource is
uploaded (like an image or a CSS) I want the system to allow me to refresh
that particular resource.

Some of the resources are added via the Wicket Code dynamically and some are
references via the Markup. Is there a difference in how these two are
treated?

In Reference[2], at the end of the post a guy mentioned about "what about
activating JMX and clearing the cache with it's help" ..that may be cool?
..or even via a API Call.


References:
1. https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment
2.
http://apache-wicket.1842946.n4.nabble.com/Refresh-resources-in-deployment-mode-td1867352.html

Thoughts and further reading appreciated!

Thanks
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resource-caching-Deployment-Mode-Re-visited-tp3027244p3027244.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Resource caching, Deployment Mode Re-visited

Posted by Arjun Dhar <dh...@yahoo.com>.
Just wanted to update this thread:

I found a convenient hack: Just replace the "class" files associated with
the markup. I'd really like to understand how all better some day; for now
when I want to refresh resources without a restart. 
Disclaimer :: It is NUTTY and could cost you your job heh.

I look at getResourceSettings().setResourcePollFrequency(null) and I think a
more "Event Listener" based approach could be considered for sites that are
looking to replace stuff at runtime without downtime. Once the core supports
some Listener, hook it up with JMX to relay events to the core.

Use case: Maybe I want to make a modification in the Inheritance hierarchy
(in some base markup) and not have to refresh. etc. preferbly have a UI that
allows that markup to be modified and on SAVE.

BTW How does Brix do it? Does Brix get everything from the JCR? I dont think
thats fair to assume everytime if that is the case.

thanks.

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resource-caching-Deployment-Mode-Re-visited-tp3027244p3048066.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Resource caching, Deployment Mode Re-visited

Posted by Arjun Dhar <dh...@yahoo.com>.
My resources are images. To be accurate I define them by adding a Custom
WebComponent in my WicketCode:
http://developme.wordpress.com/2010/05/25/wicket-image-tag-linking-to-an-external-resource/
(The blog suggests the use of it for an external component. My images are a
mixed bag ..some local F.System and some on an external system so I went
with this)

..but the problem is that when I display the images and I then want to
change the ones on the local F.S, the JVM seems to have a handle on the
file-system (F.S) for that image and replacement becomes an issue (I have
not understood really why). 

Can you suggest a better approach? ..or a way that I can ensure that i can
change the image.

thanks
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resource-caching-Deployment-Mode-Re-visited-tp3027244p3031498.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Resource caching, Deployment Mode Re-visited

Posted by Igor Vaynberg <ig...@gmail.com>.
i think the resources they talk about there are markup resources -
wicket only cashes markup and .property files. everything else like
CSS and Javascript should not be cached if modified date changed on
the file.

-igor

On Thu, Nov 4, 2010 at 8:35 AM, Arjun Dhar <dh...@yahoo.com> wrote:
>
> Hi,
>  I'm trying to understand wickets ability to cache and how to optimize of
> the deployment mode etc.
>
> I wanna keep it in production (DEPLOYMENT MODE). However, when a resource is
> uploaded (like an image or a CSS) I want the system to allow me to refresh
> that particular resource.
>
> Some of the resources are added via the Wicket Code dynamically and some are
> references via the Markup. Is there a difference in how these two are
> treated?
>
> In Reference[2], at the end of the post a guy mentioned about "what about
> activating JMX and clearing the cache with it's help" ..that may be cool?
> ..or even via a API Call.
>
>
> References:
> 1. https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment
> 2.
> http://apache-wicket.1842946.n4.nabble.com/Refresh-resources-in-deployment-mode-td1867352.html
>
> Thoughts and further reading appreciated!
>
> Thanks
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resource-caching-Deployment-Mode-Re-visited-tp3027244p3027244.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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