Closed danjee closed 9 years ago
You can wrap the Less compiler with your caching one, or use Guava CacheBuilder, or Java 8 Map#compute(), ...
I am trying to add less4j and sass-compiler as a feature in Pippo web framework at the same time. One of the framework feature it's that it has a very small footprint and I wouldn't want to add extra dependency like Guava and also Java 8 is not an option, at least for now. I was hoping that at least one of this libraries dealt with cache somehow internally. I will deal with cache in the same way it's handled in wicket-bootstrap, at least for less4j.
If you find a bug or a room for improvement in wicket-bootstrap-less then please let me know! :-)
Most likely I will not find a bug and that take that API as a milestone. Thanks again for your fast responses.
Is there a way to cache the result internally? If I send the same source input just return an already compiled version from a previous request?