Clear wro cache at runtime

460 views
Skip to first unread message

Edgar Espina

unread,
Apr 4, 2013, 1:19:51 PM4/4/13
to wr...@googlegroups.com
Hi,

 I wonder if there is a way of clearing the wro cache at runtime through a servlet or similar.

Thanks

Alex Objelean

unread,
Apr 4, 2013, 1:37:10 PM4/4/13
to wr...@googlegroups.com
Hi Edgar,

when in DEVELOPMENT mode (debug=true), the following endpoint is active: /${wroPath}/wroAPI/reloadCache (where ${wroPath} is the path mapped for WroFilter. 

You can find more details about that here: https://code.google.com/p/wro4j/wiki/RequestHandler

Cheers,
Alex



--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wro4j+un...@googlegroups.com.
To post to this group, send email to wr...@googlegroups.com.
Visit this group at http://groups.google.com/group/wro4j?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alex Objelean

unread,
Apr 4, 2013, 1:37:54 PM4/4/13
to wr...@googlegroups.com
Also it is possible to trigger the cache clear through JMX (if jmx is enabled).




On 4 April 2013 20:19, Edgar Espina <espina...@gmail.com> wrote:

--

din...@gmail.com

unread,
Jun 4, 2015, 12:55:06 AM6/4/15
to wr...@googlegroups.com
Is there any way to do so in PRODUCTION mode, other than JMX?

Alex Objelean

unread,
Jun 4, 2015, 12:12:02 PM6/4/15
to wr...@googlegroups.com
Hi,

currently, JMX is the only way to do that in production mode. What are the other options you are thinking about?

Thanks,
Alex

Visit this group at http://groups.google.com/group/wro4j.
For more options, visit https://groups.google.com/d/optout.

din...@gmail.com

unread,
Jun 4, 2015, 12:49:52 PM6/4/15
to wr...@googlegroups.com
Hi Alex,

Thank you for your quick response.

I was wondering if I could invoke the function from some Java object directly for my RESTful API integration need.


Thanks,
Ching

alex.o...@gmail.com

unread,
Jun 4, 2015, 2:56:18 PM6/4/15
to wr...@googlegroups.com
It is indeed possible to achieve the same using a RESTful API. Search for RequestHandler in documentation. There is one available which allows to flush the cache but only in DEVELOPMENT mode for security reasons. You can extend it and allow its invocation either publicly or using custom authorisation mechanism.

If you have any questions, don't hesitate to ask.

Cheers, 
Alex


Sent from Mailbox
Reply all
Reply to author
Forward
0 new messages