Code Monkey home page Code Monkey logo

Comments (6)

lifus avatar lifus commented on August 20, 2024

it seems that a webapp restart is required for the hash of a group to update.

You may use resourceWatcherUpdatePeriod during development. I thought I've mentioned it in README file
Note: Please make sure to turn it off in production.

If I restart the webapp, then I get an exception, eg.
ro.isdc.wro.WroRuntimeException: No such group available in the model: external-d3a9f9523f74c740f8a9daaa03412331

Default wro4j in-memory cache gets invalidates after restart. It shouldn't be an issue because taglib generates relevant resource url and inserts it in resulting html.
You shouldn't rely on hashed name. If you really want to get the latest version of resource directly(e.g. from code) you should use it's raw unhashed url e.g. external.css

from wro4j-runtime-taglib.

tveimo avatar tveimo commented on August 20, 2024

Ok, it wasn't configured in this example, but I've tried a lot of different combinations. Am now thinking that something is preventing the scheduler from running so that the cache isn't invalidated when a file changes. I might try to debug a bit in wro4j-core to see what is going on.

from wro4j-runtime-taglib.

tveimo avatar tveimo commented on August 20, 2024

Just to clarify if I've understood the intended way this should work;

Whenever a resource changes, wro:script /wro:stylesheet should produce markup & url with a different resource fingerprint/hash than before the resource changed, without a server restart?

from wro4j-runtime-taglib.

tveimo avatar tveimo commented on August 20, 2024

It might be that my understanding of how the resourceWatcher thread works was wrong, it doesn't appear to actually monitor any files directly. If I reload a js/css group manually in the browser then on the next run of a wro4j-runtime-tag i a JSP, it will use an updated hash.

from wro4j-runtime-taglib.

lifus avatar lifus commented on August 20, 2024

Whenever a resource changes, wro:script /wro:stylesheet should produce markup & url with a different resource fingerprint/hash than before the resource changed, without a server restart?

Exactly, given that value of resourceWatcherUpdatePeriod is not zero

from wro4j-runtime-taglib.

lifus avatar lifus commented on August 20, 2024

Closing this one as well. I hope you are not experiencing this issue anymore, feel free to reopen it otherwise

from wro4j-runtime-taglib.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.