SomMeri / less4j

Less language is an extension of css and less4j compiles it into regular css. Less adds several dynamic features into css: variables, expressions, nested rules, and so on. Less was designed to be compatible with css and any correct css file is also correct less file.
145 stars 47 forks source link

Cache result #284

Closed danjee closed 9 years ago

danjee commented 9 years ago

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?

martin-g commented 9 years ago

You can wrap the Less compiler with your caching one, or use Guava CacheBuilder, or Java 8 Map#compute(), ...

danjee commented 9 years ago

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.

martin-g commented 9 years ago

If you find a bug or a room for improvement in wicket-bootstrap-less then please let me know! :-)

danjee commented 9 years ago

Most likely I will not find a bug and that take that API as a milestone. Thanks again for your fast responses.