How to clear wro4j cache in a site deployed to the AppEngine?

Skip to first unread message


May 5, 2016, 8:36:02 AM5/5/16
to wro4j
I've a site deployed to the Google AppEngine. The site uses wro4j.
Problem is that I cannot flush the cache of the wro generated files. I still have the old ones, for example old wro/main.css generated file, even if I redeployed an application with a new source css files.

I tried to kill and restart the AppEngine instances without success. Of course I also cleared my browser's cache, but still no success.
Only way I found is to deploy my application as a completely new version to GAE.

I found the description of the /wro/wroAPI/reloadCache , but it's available only in DEVELOPMENT mode.

Please, how can I clear wro4j cache on the deployed site??

Here is my file:

Thank you.

Alex Objelean

May 10, 2016, 10:25:41 AM5/10/16
Hi Filip, 

sorry for late reply.

The bundles generated by wro4j are not stored as files, rather you can see them as virtual resources stored in memory being served by endpoint corresponding for each group. Every time the application is started, the virtual resource is computed lazily (after the first request) and stored in memory for serving subsequent requests. 

The reloadCache endpoint is useful in development, because the css & js resources are changed frequently and virtual resource needs to be generated from scratch after a resource has changed. It very unlikely that you tweak your resources in production without restarting it, therefore the reloadCache endpoint is not exposed for production (however it is possible to configure the endpoint to work for non debug mode as well).

I suspect that the real reason of why you see the old resource even after restarting the application is the caching headers. This is something you can configure (by using far expiry date). The best practice is to use aggressive caching by combining far expiry date with generating unique url (which encodes the version number of the bundled resources in its path). 

I don't really see the difference between restarting the AppEngine and deploying a completely new version of GAE. This shouldn't really matter if the app is deployed with GAE or somehow else.  

Let me know if that helps or if you have more details which would help to understand the problem.

Alex Objelean

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
To post to this group, send email to
Visit this group at
For more options, visit

Reply all
Reply to author
0 new messages